XMColorRGBToHSV method

Converts RGB color values to HSV color values.

Syntax


XMVECTOR XMColorRGBToHSV(
  [in]  XMVECTOR rgb
);

Parameters

rgb [in]

Color value to convert. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha. Each has a range of 0.0 to 1.0.

Return value

Returns the converted color value. The X element is Hue (H), the Y element is Saturation (S), the Z element is Value (V), and the W element is Alpha (a copy of rgb.w). Each has a range of 0.0 to 1.0.

Remarks

Note  XMColorRGBToHSV is new for DirectXMath and is not available for XNAMath 2.x.

Platform Requirements

Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.

Requirements

Namespace

Use DirectX.

Header

DirectXMath.h

See also

XMColorHSVToRGB

 

 

Community Additions

ADD
Show:
© 2014 Microsoft