color.theme

A color for dark chart themes and another for light ones, in one value. Use it anywhere a color goes (plots, fills, lines, boxes, labels, tables, bgcolor, barcolor, input.color): the chart draws the part of its theme, and a theme switch only redraws. The script never learns which theme is active: color.r / g / b / t read the dark part.

color.theme(dark: color, light: color) -> color

Parameters

Example

plot(close, "Close", color=color.theme(#ffffff, #18181b))