Functions
color.g()
Reads the green component of a colour. Like the other two component functions, it returns a whole number from 0 to 255.
Syntax · 1 of 4
color.g(const color color) → const int
Arguments
color required const color the colour to inspect Return Type
const int Syntax · 2 of 4
color.g(input color color) → input int
Arguments
color required input color the colour to inspect Return Type
input int Syntax · 3 of 4
color.g(simple color color) → simple int
Arguments
color required simple color the colour to inspect Return Type
simple int Syntax · 4 of 4
color.g(series color color) → series int
Arguments
color required series color the colour to inspect Return Type
series int Example
indicator("color.g Example", overlay=true)
c = color.new(color.red, 0)
g = color.g(c)
plot(g, title="Green component", color=color.green)