Click to Rate and Give Feedback
MSDN
MSDN Library
Windows GDI
Colors
Color Reference
Color Structures
 COLORREF
Windows GDI
COLORREF

The COLORREF value is used to specify an RGB color.

typedef DWORD COLORREF;
typedef DWORD *LPCOLORREF;

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

  Windows NT/2000/XP/Vista: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Windef.h; include Windows.h.

See Also

Colors Overview, Color Structures, GetBValue, GetGValue, GetRValue, RGB


Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker