D3DCOLOR_XYUV macro

Initializes a color with the (y, u, v) values.

Syntax

D3DCOLOR D3DCOLOR_XYUV(
   int y,
   int u,
   int v
);

Parameters

y

Luminance component of the color. This value must be in the range 0 through 255.

u

Blue brightness of the color. This value must be in the range 0 through 255.

v

Red brightness of the color. This value must be in the range 0 through 255.

Return value

Returns the D3DCOLOR value that corresponds to the supplied (y, u, v) values.

Remarks

An RGB color can be reduced to 16 bits per pixel by conversion to luminance and color differences with the following equations:

y (luminance) = 0.299*red + 0.587*green + 0.114*blue
u = blue - luminance
v = red - luminance 

Requirements

Requirement Value
Header
D3d9types.h

See also

Macros

D3DCOLOR_ARGB

D3DCOLOR_AYUV