Rval
Syntax
- int Rval(int rgb)
Arguments
- rgb
- Either a 32-bit RGB triple or a 32-bit RGBA quadruple; in either case, the red, green and blue channels are represented as eight bit values, as is the alpha channel in the RGBA form.
Return
- A value in the range 0 to 255 inclusive.
Description
- The return value represents the value of the red channel, extracted from the triple (or quadruple).
Example
- red = Rval(fgColor); // Gives the red channel value from the current foreground color
Also see
- Aval,Bval,Gval
Comments
- Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.