DirectX SDK

D3DRGBA

The D3DRGBA macro initializes a color with the supplied RGBA values.

D3DRGBA(r, g, b, a) \ 
    ((((long)((a) * 255)) << 24) | 
    (((long)((r) * 255)) << 16) | 
    (((long)((g) * 255)) << 8) | (long)((b) * 255)) 

Parameters

r, g, b, and a
Red, green, blue, and alpha components of the color.

Return Values

Returns the D3DCOLOR value corresponding to the supplied RGBA values.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Version: Requires DirectX 2.0 or later.
  Header: Declared in d3dtypes.h.

See Also

D3DRGB