color.r
Reads the red component back out of a colour. The figure comes back on the scale it went in on, 0 to 255.
color.r(const color color) → const intcolor.r(input color color) → input intcolor.r(series color color) → series intcolor.r(simple color color) → simple int| Parameter | Type | Required | Description |
|---|---|---|---|
color | const color | yes | the colour to inspect |
Returns const int or input int or series int or simple int — An int from 0 to 255, or na where the colour is na.
indicator("Red component of a colour")
plot(color.r(color.blue))See also colour · color.a · color.b · color.g
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.