Colours reference
The 7 functions and 17 values of color: signature, effects, phase, cost and tested examples.
Make a colour from parts, fade it, or take it apart.
Functions#
color.blue_of#
color.blue_of([color])
The red, green or blue part of a colour.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
color.fade#
color.fade(color, [percent])
Makes a colour more transparent by percent.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
- Examples: RSI zones, Bollinger bands, Status table, Recent range drawing.
color.fade_of#
color.fade_of([color])
The transparency of a colour, in percent.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
color.gradient#
color.gradient([value], [min], [max], [min_color], [max_color])
A colour between two colours, by where value lies between min and max.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
color.green_of#
color.green_of([color])
The red, green or blue part of a colour.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
color.red_of#
color.red_of([color])
The red, green or blue part of a colour.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
color.rgb#
color.rgb(red, green, blue, [fade])
A colour from its red, green and blue parts.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
Values#
color.aquacolor.blackcolor.bluecolor.fuchsiacolor.graycolor.greencolor.limecolor.marooncolor.navycolor.olivecolor.orangecolor.purplecolor.redcolor.silvercolor.tealcolor.whitecolor.yellow