RGBA (Compact 2013)
This macro selects a color based on the specified color values, the alpha value, and the capabilities of the output device.
The return value is a COLORREF that corresponds to the supplied color and alpha values.
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.
For information about using color values in a color palette, see the description of the PALETTERGB macro.
The RGBA macro is defined as follows:
#ifndef RGBA #define RGBA(r,g,b,a) ((COLORREF)( (((DWORD)(BYTE)(a))<<24) | RGB(r,g,b) )) #endif