color.r() - Pine Script Function
color.r()
Section titled “color.r()”Overview
Section titled “Overview”Retrieves the value of the color’s red component.
Syntax
Section titled “Syntax”color.r(color) → const floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| color | const color | Color. |
Returns
Section titled “Returns”The value (0 to 255) of the color’s red component.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("color.r", overlay=true)plot(color.r(color.red))