green function

Input type Output type
color float

The green function extracts the green component of a color and returns it. Colors contain four components: red, green, blue, and alpha. To construct a color from the individual components, use the rgb or rgba functions.

Examples:

  green(rgb(1, 0.2, 0))    ; 0.2  green(rgb(0.5, 1, 0.3))  ; 1.0  green(hsl(2, 1, 0.5))    ; 1.0    

See Also
red function
blue function
hue function
alpha function
Writing direct coloring algorithms

green function