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 Color. Return Type
const int Syntax · 2 of 4
color.g(input color color) → input int
Arguments
color required input color Color. Return Type
input int Syntax · 3 of 4
color.g(simple color color) → simple int
Arguments
color required simple color Color. Return Type
simple int Syntax · 4 of 4
color.g(series color color) → series int
Arguments
color required series color Color. Return Type
series int Example
//@lipi=2
indicator("color.g Example", overlay=true)
c = color.new(color.red, 0)
g = color.g(c)
plot(g, title="Green component", color=color.green)