color.g() - Pine Script Function
color.g()
Section titled “color.g()”Overview
Section titled “Overview”Retrieves the value of the color’s green component.
Syntax
Section titled “Syntax”color.g(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 green component.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("color.g", overlay=true)plot(color.g(color.green))