XMColorXYZToSRGB 函数 (directxmath.h)

将 XYZ 颜色值转换为 SRGB 颜色值。

语法

XMVECTOR XM_CALLCONV XMColorXYZToSRGB(
  [in] FXMVECTOR xyz
) noexcept;

参数

[in] xyz

要用相应元素中 X、Y 和 Z 的三次映像值以及带有 Alpha 的 W 元素进行转换的颜色值。 每个的范围为 0.0 到 1.0。

返回值

返回转换后的颜色值。 X 元素为 Red,Y 元素为 Green,Z 元素为 Blue,W 元素为 Alpha (xyz.w) 的副本。 在线性 sRGB 颜色空间中,每个颜色空间的范围为 0.0 到 1.0。

注解

使用 CIE XYZ 颜色空间。

sRGB 线性颜色空间定义为 IEC 61966-2-1:1999。

注意XMColorXYZToSRGB 是 DirectXMath 的新增功能,不适用于 XNAMath 2.x。
 

平台要求

Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 以及 Windows SDK for Windows 8。 支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。

要求

要求
目标平台 Windows
标头 directxmath.h

另请参阅

DirectXMath 库颜色函数

XMColorSRGBToXYZ