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
darkcolor: The color the chart draws in dark themes (Terminal and the other dark ones); na draws nothing there. A color.theme color gives its dark part.lightcolor: The color the chart draws in light themes (Paper and the other light ones); na draws nothing there. A color.theme color gives its light part.
Example
plot(close, "Close", color=color.theme(#ffffff, #18181b))