color

A colour. You can write one directly as a hex literal — six digits for the colour, eight to carry alpha as well. Seventeen named constants and six functions in the color namespace give you the other ways to get one. No fields.

color(const color value) → const color
color(input color value) → input color
color(series color value) → series color
color(simple color value) → simple color
ParameterTypeRequired
valueconst coloryes

Returns const color or input color or series color or simple color

indicator("Colour conversion")
plot(close, title = "Close", color = color(color.blue))

See also values and types

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade