Skip to content
Algo Trade Analytics Docs

input.color() - Pine Script Function

Adds an input to the Inputs tab of your script’s Settings, which allows you to provide configuration options to script users. This function adds a color picker that allows the user to select a color and transparency, either from a palette or a hex value.

input.color(defval, title, tooltip, inline, group, confirm, display, active) → input color
NameTypeDescription
defvalconst colorDetermines the default value of the input variable proposed in the script’s “Settings/Inputs” tab
fromwhere the user can change it.

Value of input variable.

  • Result of input.color function always should be assigned to a variable, see examples above.
//@version=6
indicator("input.color", overlay=true)
i_col = input.color(color.red, "Plot Color")
plot(close, color=i_col)