Microsoft DirectX 8.1 (C++)

D3DCOLOR_COLORVALUE

Initializes a color with the supplied red, green, blue, and alpha floating-point values.

D3DCOLOR_COLORVALUE(r,g,b,a) \
    D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f))

Parameters

r, g, b, and a
Red, green, blue, and alpha components of the color. These values must be floating-point values in the range 0.0 through 1.0.

Return Values

Returns the D3DCOLOR value that corresponds to the supplied RGBA values.

Requirements

  Header: Declared in D3d8types.h.