D3DCOLOR_AYUV macro

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

Syntax

D3DCOLOR D3DCOLOR_AYUV(
   int a,
   int y,
   int u,
   int v
);

Parameters

a

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

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 ARGB 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_XYUV