input.color
Asks the reader for a colour. Pass the result straight to a colour argument of a chart-output call; those arguments accept an input-form colour.
input.color(const color defval, const string title, const string tooltip, const string inline, const string group, const bool confirm) → input color| Parameter | Type | Required | Description |
|---|---|---|---|
defval | const color | yes | The colour the control starts at. Required. |
title | const string | no | The label shown beside the control. |
tooltip | const string | no | Help text for the control. |
inline | const string | no | A key that puts several controls on one row. |
group | const string | no | A heading the control sits under. |
confirm | const bool | no | Asks the reader to confirm the value. |
Returns input color — An input color.
indicator("Reader's colour")
plot(close, title = "Close", color = input.color(color.blue, "Line colour"))See also inputs · input.bool · input.float · input.int
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.