D3DRGB

The D3DRGB macro initializes a color with the supplied RGB values.

D3DRGB(r, g, b) \ 
    (0xff000000L | ( ((long)((r) * 255)) << 16) | \ 
    (((long)((g) * 255)) << 8) | (long)((b) * 255)) 
 

Parameters

r, g, and b
Red, green, and blue components of the color. These should be floating-point values in the range 0 through 1.

Return Values

The macros returns the D3DCOLOR value corresponding to the supplied RGB values.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in d3dtypes.h.

See Also

D3DRGBA