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.
Colorscheme
DarkWaveColorThemesLibrary "DarkWaveColorThemes"
Description:
A simple, binary color-theming library that provides you with easy-access 'bullish and bearish' colors which you can use to make your indicators more aesthetically pleasing. These color themes were developed to help the community make indicators look excellent with ease.
Functions:
1. getThemeColor(themeName, colorType)
Description:
This function returns a color (either a 'Bullish' or 'Bearish' color, depending on your 'colorType' parameter input) according to the theme you have supplied as the 'themeName' parameter.
Parameters:
themeName (string) : Specify the theme you want to reference. Options include: 'DarkWave', 'Synthwave', 'DarkWave Crypto', 'Crystal Pool', 'Aquafarer', 'Mystic Armor', 'Futurist', 'Electric Zest', 'Stealth Ride', 'Long Trader', 'Short Trader', 'Emerald Glow', 'Gold Heist', 'Floral', 'Cobalt Twilight', and 'Sunrise'.
colorType (string) : Specify which color you want to reference from the theme. Options include: 'Bullish' and 'Bearish'.
Returns:
Your specified color type according to your specified theme.
UtilsLibrary "Utils"
Utility functions. Mathematics, colors, and auxiliary algorithms.
setTheme(vc, theme)
Set theme for levels (predefined colors).
Parameters:
vc : (valueColorSpectrum) Object to associate a color with a value, taking into account the previous value and its levels.
theme : (int) Theme (predefined colors).
0 = 'User defined'
1 = 'Spectrum Blue-Green-Red'
2 = 'Monokai'
3 = 'Green'
4 = 'Purple'
5 = 'Blue'
6 = 'Red'
Returns: (void)
setTheme(vc, colorLevel_Lv1, colorLevel_Lv1_Lv2, colorLevel_Lv2_Lv3, colorLevel_Lv3_Lv4, colorLevel_Lv4_Lv5, colorLevel_Lv5)
Set theme for levels (customized colors).
Parameters:
vc : (valueColorSpectrum) Object to associate a color with a value, taking into account the previous value and its levels
colorLevel_Lv1 : (color) Color associeted with value when below Level 1.
colorLevel_Lv1_Lv2 : (color) Color associeted with value when between Level 1 and 2.
colorLevel_Lv2_Lv3 : (color) Color associeted with value when between Level 2 and 3.
colorLevel_Lv3_Lv4 : (color) Color associeted with value when between Level 3 and 4.
colorLevel_Lv4_Lv5 : (color) Color associeted with value when between Level 4 and 5.
colorLevel_Lv5 : (color) Color associeted with value when above Level 5.
Returns: (void)
setCurrentColorValue(vc)
Set color to a current value, taking into account the previous value and its levels
Parameters:
vc : (valueColorSpectrum) Object to associate a color with a value, taking into account the previous value and its levels
Returns: (void)
setCurrentColorValue(vc, gradient)
Set color to a current value, taking into account the previous value.
Parameters:
vc : (valueColor) Object to associate a color with a value, taking into account the previous value
gradient
Returns: (void)
setCustomLevels(vc, level1, level2, level3, level4, level5)
Set boundaries for custom levels.
Parameters:
vc : (valueColorSpectrum) Object to associate a color with a value, taking into account the previous value and its levels
level1 : (float) Boundary for level 1
level2 : (float) Boundary for level 2
level3 : (float) Boundary for level 3
level4 : (float) Boundary for level 4
level5 : (float) Boundary for level 5
Returns: (void)
getPeriodicColor(originalColor, density)
Returns a periodic color. Useful for creating dotted lines for example.
Parameters:
originalColor : (color) Original color.
density : (float) Density of color. Expression used in modulo to obtain the integer remainder.
If the remainder equals zero, the color appears, otherwise it remains hidden.
Returns: (color) Periodic color.
dinamicZone(source, sampleLength, pcntAbove, pcntBelow)
Get Dynamic Zones
Parameters:
source : (float) Source
sampleLength : (int) Sample Length
pcntAbove : (float) Calculates the top of the dynamic zone, considering that the maximum values are above x% of the sample
pcntBelow : (float) Calculates the bottom of the dynamic zone, considering that the minimum values are below x% of the sample
Returns: A tuple with 3 series of values: (1) Upper Line of Dynamic Zone;
(2) Lower Line of Dynamic Zone; (3) Center of Dynamic Zone (x = 50%)
valueColorSpectrum
# Object to associate a color with a value, taking into account the previous value and its levels.
Fields:
currentValue
previousValue
level1
level2
level3
level4
level5
currentColorValue
colorLevel_Lv1
colorLevel_Lv1_Lv2
colorLevel_Lv2_Lv3
colorLevel_Lv3_Lv4
colorLevel_Lv4_Lv5
colorLevel_Lv5
theme
valueColor
# Object to associate a color with a value, taking into account the previous value
Fields:
currentValue
previousValue
currentColorValue
colorUp
colorDown
base16Library "base16"
Base16 Syntax Theme Collection. dark/light Pairs placed into 2 matched groups.
included is tool for assembling your own themes, as well as all themes String names
to create your own Input menus / add to your own theme matrix, and theme selectors
addToMatrix(_mtx, _title, _choices, _theme)
To create a theme matrix with string index, use a color matrix global
add theme name to string array of theme titles
and last input a theme from above, or create your own theme arrays.
Parameters:
_mtx : (color ) matrix for storage
_title : (string ) Name of theme being added
_choices : (string ) name index
_theme : (color ) colors being added
Returns: void
addToMatrix(_mtx, _theme)
Add theme to color matrix Non-indexed
Parameters:
_mtx : (color ) matrix for storage
_theme : (color ) colors being added
dark()
Dark Themne Selection (With light Equivalent in same location)
Returns: Color matrix of dark themes
light()
light Themne Selection (With dark Equivalent in same location)
Returns: Color matrix of light themes
selectTheme(_mtx, _themes, _theme)
Get a Theme By Name
Parameters:
_mtx : (Matrix color) Name of Theme
_themes : (Array string) Array with Names of Themes
_theme : (string ) Name of Theme to select
selectTheme(_mtx, _theme)
Get a Theme By Number
Parameters:
_mtx : (Matrix color) Name of Theme
_theme : (int ) Number of Theme to select
/// all themes included:
3024
apathy
apprentice
ashes
atelier_cave_light
atelier_cave
atelier_dune_light
atelier_dune
atelier_estuary_light
atelier_estuary
atelier_forest_light
atelier_forest
atelier_heath_light
atelier_heath
atelier_lakeside_light
atelier_lakeside
atelier_plateau_light
atelier_plateau
atelier_savanna_light
atelier_savanna
atelier_seaside_light
atelier_seaside
atelier_sulphurpool_light
atelier_sulphurpool
atlas
ayu_dark
ayu_light
ayu_mirage
bespin
black_metal_bathory
black_metal_burzum
black_metal_dark_funeral
black_metal_gorgoroth
black_metal_immortal
black_metal_khold
black_metal_marduk
black_metal_mayhem
black_metal_nile
black_metal_venom
black_metal
blue_forest
blueish
brewer
bright
brogrammer
brush_trees_dark
brush_trees
catppuccin
chalk
circus
classic_dark
classic_light
codeschool
clrs
cupcake
cupertino
da_one_black
da_one_gray
da_one_ocean
da_one_paper
da_one_sea
da_one_white
danqing_light
danqing
darcula
darkmoss
darktooth
dark_violet
decaf
default_dark
default_light
dirtysea
dracula
edge_dark
edge_light
eighties
embers
emil
equilibrium_dark
equilibrium_gray_dark
equilibrium_gray_light
equilibrium_light
espresso
eva_dim
eva
everforest
flat
framer
fruit_soda
gigavolt
github
google_dark
google_light
gotham
grayscale_dark
grayscale_light
green_screen
gruber
gruvbox_dark_hard
gruvbox_dark_medium
gruvbox_dark_pale
gruvbox_dark_soft
gruvbox_light_hard
gruvbox_light_medium
gruvbox_light_soft
gruvbox_material_dark_hard
gruvbox_material_dark_medium
gruvbox_material_dark_soft
gruvbox_material_light_hard
gruvbox_material_light_medium
gruvbox_material_light_soft
hardcore
harmonic16_dark
harmonic16_light
heetch_light
heetch_dark
helios
hopscotch
horizon_dark
horizon_light
horizon_terminal_dark
horizon_terminal_light
humanoid_dark
humanoid_light
ia_dark
ia_light
icy_dark
ir_black
isotope
kanagawa
katy
kimber
lime
macintosh
marrakesh
materia
material_darker
material_lighter
material_palenight
material_vivid
material
mellow_purple
mexico_light
mocha
monokai
Nebula
nord
nova
ocean
oceanicnext
one_light
onedark
outrun_dark
pandora
papercolor_dark
papercolor_light
paraiso
pasque
phd
pico
pinky
pop
porple
primer_dark_dimmed
primer_dark
primer_light
purpledream
qualia
railscasts
rebecca
rose_pine_dawn
rose_pine_moon
rose_pine
sagelight
sakura
sandcastle
seti_ui
shades_of_purple
shadesmear_dark
shadesmear_light
shapeshifter
silk_dark
silk_light
snazzy
solar_flare_light
solar_flare
solarized_dark
solarized_light
spaceduck
spacemacs
stella
still_alive
summercamp
summerfruit_dark
summerfruit_light
synth_midnight_terminal_dark
synth_midnight_terminal_light
tango
tender
tokyo_city_dark
tokyo_city_light
tokyo_city_terminal_dark
tokyo_city_terminal_light
tokyo_night_dark
tokyo_night_light
tokyo_night_storm
tokyo_night_terminal_dark
tokyo_night_terminal_light
tokyo_night_terminal_storm
tokyodark_terminal
tokyodark
tomorrow_night_eighties
tomorrow_night
tomorrow
london_tube
twilight
unikitty_dark
unikitty_light
unikitty_reversible
uwunicorn
vice
vulcan
windows_10_light
windows_10
windows_95_light
windows_95
windows_high_contrast_light
windows_high_contrast
windows_nt_light
windows_nt
woodland
xcode_dusk
zenburn
Color Library: Rainbow Index & Simplest Return ColorLibrary "Color Library!"
To help with large projects that need colors!
If you guys make the library bigger, share it so we can all have tons of colors!
2 Functions
Uppercase and Lowercase, because why not?
import library as color
1.) color.this("Brown") // or color.this("brown") both work
2.) color.rainbow(1) //Returns first index of Rainbow
this(x)
TODO: color.this(Brown)
Parameters:
x : TODO: String Color Name
Returns: TODO: Color
rainbow(x)
TODO: Return Rainbow Index
Parameters:
x : TODO: Number is index of Rainbow :)
Returns: TODO: Color