COLORREF RGB(cRed,cGreen,cBlue)
This macro selects an RGB color based on the parameters supplied and the color capabilities of the output device.
Parameter | Type/Description |
cRed | BYTE Specifies the intensity of the red color field. | |
cGreen | BYTE Specifies the intensity of the green color field. | |
cBlue | BYTE Specifies the intensity of the blue color field. |
The return value specifies the resultant RGB color.
The intensity for each argument can range from 0 to 255. If all three intensities are specified as 0, the result is black. If all three intensities are specified as 255, the result is white.
For information on using color values in a color palette, see the descriptions of the PALETTEINDEX and PALETTERGB macros, earlier in this chapter.