XMColorRGBToSRGB

Converts RGB color values to sRGB color values.

Syntax

XMVECTOR XMColorRGBToSRGB(
         XMVECTOR rgb
)  

Parameters

rgb
Type: XMVECTOR 

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

Type: XMVECTOR 

Returns the converted color value. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha (a copy of rgb.w). Each has a range of 0.0 to 1.0 in the linear sRGB colorspace.

Remarks

The sRGB linear color space is defined as IEC 61966-2-1:1999.

Requirements

Header: Declared in directxmath.h.