color.from_gradient

Color between bottom_color and top_color by where value sits between bottom_value and top_value. With color.theme colors the dark and light parts each get their own gradient.

color.from_gradient(value: int/float, bottom_value: int/float, top_value: int/float, bottom_color: color, top_color: color) -> color

Parameters

Example

rsiColor = color.from_gradient(ta.rsi(close, 14), 30, 70, color.red, color.teal)