Share via


COLORREF

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This value is a 32-bit value used to specify an RGB color.

Syntax

typedef DWORD COLORREF;
typedef DWORD* LPCOLORREF;

Members

None.

Remarks

When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form.

0x00bbggrr

The low-order byte contains a value for the relative intensity of red, the second byte contains a value for green, and the third byte contains a value for blue.

The high-order byte must be zero.

The maximum value for a single byte is 0xFF.

To create a COLORREF color value, use the RGB macro.

To extract the individual values for the red, green, and blue components of a color value, use the GetRValue, GetGValue, and GetBValue macros, respectively.

Requirements

Header windows.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

GetBValue
GetGValue
GetRValue
RGB
SetBkColor
GDI Structures