RGB macro (wingdi.h)
The RGB macro selects a red, green, blue (RGB) color based on the arguments supplied and the color capabilities of the output device.
Syntax
void RGB(
r,
g,
b
);
Parameters
r
The intensity of the red color.
g
The intensity of the green color.
b
The intensity of the blue color.
Return value
None
Remarks
The intensity for each argument is in the range 0 through 255. If all three intensities are zero, the result is black. If all three intensities are 255, the result is white.
To extract the individual values for the red, green, and blue components of a COLORREF color value, use the GetRValue, GetGValue, and GetBValue macros, respectively.
When creating or examining a logical palette, use the RGBQUAD structure to define color values and examine individual component values. For more information about using color values in a color palette, see the descriptions of the PALETTEINDEX and PALETTERGB macros.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |