XMColorRGBToSRGB function (directxmath.h)

Converts an RGB color vector to sRGB.

Syntax

XMVECTOR XM_CALLCONV XMColorRGBToSRGB(
  FXMVECTOR rgb
) noexcept;

Parameters

rgb

The original RGB color vector.

Return value

Returns an XMVECTOR describing the converted sRGBA color vector. The x element is red, the y element is green, the z element is blue, and the w element is the alpha value (which is a copy of rgb.w). Each element value has a range of 0.0 to 1.0 in the sRGB colorspace.

Requirements

Requirement Value
Target Platform Windows
Header directxmath.h

See also

DirectXMath Library Color Functions

XMColorSRGBToRGB