Material Design ColorsThis library provides a standard set of colors defined in Material Design 2.0.
🔵 API
Step 1: Import this library.
import algotraderdev/material/1
// remember to check the latest version of this library and replace the 1 above.
Step 2: Get the color you like. Check the source code or the screenshot above to see all the supported colors.
material.red()
Each color function (except for `black()` and `white()`) accepts an optional `variant` parameter. You can choose any of 50, 100, 200, 300, 400, 500, 600, 700, 800, and 900. By default, 500 is chosen if this parameter is not provided.
Design
Branch CurveLibrary "branch"
Generates a branch made of segments with a starting angle
and a turning angle for each segment. The branch is generated from a starting point
and a number of nodes to generate. The length of each segment and angle of each segment
can be adjusted. The branch can be generated in 2D or 3D, render as you wish.
method branch(origin, nodes, segment_length, segment_growth, angle_start, angle_turn)
# Branch Generation.
- `origin`: CommonTypesMath.Vector3 - The starting point of the branch. If the z value is not zero, it will be used as the starting angle.
- `nodes`: int - The number of nodes to generate.
- `segment_length`: float - The length of each segment.
- `segment_growth`: float - The growth of each segment. 0 = no growth, 100 = double the length of the previous segment.
- `angle_start`: float - The starting angle of the branch in degrees.
- `angle_turn`: float - The turning angle of each segment in degrees.
Namespace types: CommonTypesMath.Vector3
Parameters:
origin (Vector3 type from RicardoSantos/CommonTypesMath/1) : The starting point of the branch. If the z value is not zero, it will be used as the starting angle.
nodes (int) : The number of nodes to generate.
segment_length (float) : The length of each segment.
segment_growth (float) : The growth of each segment. 0 = no growth, 100 = double the length of the previous segment.
angle_start (float) : The starting angle of the branch in degrees.
angle_turn (float) : The turning angle of each segment in degrees.
@return segments The list of segments that make up the branch.
theme_engineLibrary "theme_engine"
Theme Builder and Structure for live generative themes
init(_name)
New theme object.
Parameters:
_name : (string) opptional name
Returns: a VAR theme (holds it's vals when updated if not overwritten)
globals(theme, _h1, _h2, _h3, _h4, _s, _val, _contrast)
Create light/dark theme globals
Parameters:
theme : (theme) Theme to add theses to
_h1 : (float) Hue #1 for Template
_h2 : (float) Hue #2 for Template
_h3 : (float) Hue #3 for Template
_h4 : (float) Hue #4 for Template
_s : (float) Saturation of theme
_val : (float) Luminosity (light/dark)
_contrast : (float) Contrast to apply
Returns: Theme wwith adjusted colors
setConfig(theme, setting)
Apply a Settings object to a theme
Parameters:
theme : Theme object to apply settings to.
setting : settings to apply
Returns: theme
Types :
settings
Settings for a theme
Fields:
h1 : (float) Hue #1 for Template
h2 : (float) Hue #2 for Template
h3 : (float) Hue #3 for Template
h4 : (float) Hue #4 for Template
sat : (float) Saturation of theme
lum : (float) Luminosity (light/dark)
vib : (float) Vibrance (Contrast)
r : (float) Hue of Red
o : (float) Hue of Orange
y : (float) Hue of Yellow
g : (float) Hue of Green
a : (float) Hue of Aqua
b : (float) Hue of Blue
i : (float) Hue of Indigo
v : (float) Hue of Violet
satvals : (settings) Array for use if desired to customize Saturation per color
lumvals : (settings) Array for use if desired to customize Luminancce per color
mods
Modifiers Item for Use if desired
Fields:
val : (float)
size : (float)
depth : (float)
hue : (float)
sat : (float)
alpha : (float)
mix : (float)
emit : (float)
ch : (float)
step : (int)
dist : (int)
holds : (mods)
isin : (mods)
track : (color)
varient
Light/Dark/Custom Theme Varients
Fields:
bg : (color) Bacckground Color
fg : (color) Foreground Color
accent : (color) Accccent Color
secondary : (color) Secondary Color
txt : (color) Text Color
theme
Theme Object
Fields:
name : (string) Theme name
dark : (varient) Theme dark Varient
light : (varient) Theme light Varient
red : (color) Color for red
orange : (color) Color for orange
yellow : (color) Color for yellow
green : (color) Color for green
aqua : (color) Color for aqua
blue : (color) Color for blue
purple : (color) Color for purple
pink : (color) Color for pink
tweaks : (mods) Modifiers UDT to use for adjusters
themedict
Fields:
names : (string ) Names of themes
themes : (theme ) Theme Items
fontLibrary "font"
Unicode Characters Replacement function for strings.
uni(_str, _number)
Unicode Font Substitutee
Parameters:
_str : Input Strinbg
_number : Font by Int input
uni(_str, _number)
Unicode Font Substitutee
Parameters:
_str : Input Strinbg
_number : Font by Name input
ColorArrayLibrary "ColorArray"
Simple color array gradient tool.
makeGradient(size, _col1, _col2, _col3, _col4, _col5) Color Gradient Array from 5 colors.
Parameters:
size : : default 10
_col1 : : default #ff0000
_col2 : : default #ffff00
_col3 : : default #00ff00
_col4 : : default #00ffff
_col5 : : default #0000ff
Returns: array of colors to specified size.