int Gval(int rgb)
A value in the range 0 to 255 inclusive.
The return value represents the value of the green channel, extracted from the triple (or quadruple).
// Gives the green channel value // from current foreground color green = Gval(fgColor);
Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.