Lipi Reference Lipi

Functions

input.color()

function allows users to select a color from the script settings.This function adds a color picker that allows the user to select a color and transparency, either from a palette or a hex value.

Syntax

                input.color(const color defval, const string title, const string tooltip, const string inline, const string group, const bool confirm) → input color
              

Arguments

defval required const color Determines the default value of the input variable proposed in the script's "Settings/Inputs" tab, from where the user can change it.
title const string Title of the input. If not specified, the variable name is used as the input's title. If the title is specified, but it is empty, the name will be an empty string.
tooltip const string The string that will be shown to the user when hovering over the tooltip icon.
inline const string Combines all the input calls using the same argument in one line. The string used as an argument is not displayed. It is only used to identify inputs belonging to the same line.
group const string Creates a header above all inputs using the same group argument string. The string is also used as the header's text.
confirm const bool

Return Type

input color

Example


          indicator("Custom SMA", overlay=true)
smaColor = input.color(color.blue, title="SMA Color")
plot(talib.sma(close, 14), color=smaColor)