XColor

指定 ARGB 颜色。

语法

typedef struct XColor {  
    union  
    {  
        struct  
        {  
            uint8_t A;  
            uint8_t R;  
            uint8_t G;  
            uint8_t B;  
        };  
        uint32_t Value;  
    };  
} XColor  

成员

A
类型:uint8_t

Alpha 通道的值。

R
类型:uint8_t

红色通道的值。

G
类型:uint8_t

绿色通道的值。

B
类型:uint8_t

蓝色通道的值。


类型:uint32_t

ARGB 值。

备注

其他游戏运行时功能使用 XColor 结构来表示 ARGB 值。 例如,XClosedCaptionProperties 结构使用 XColor 来表示隐藏字幕的背景、字体和窗口颜色。

ARGB 值表示为一个 32 位数字:alpha、红色、绿色和蓝色通道各使用 8 位。 这四个信道中的每个信道都是介于 0 到 255 之间的一个 8 位数字;0 表示无强度,255 表示整个强度。 Value 成员表示 32 位 ARGB 值,ARGB 成员分别表示该值的 8 位 alpha、红色、绿色和蓝色通道部分。

要求

头文件:XGameRuntimeTypes.h

支持平台:Windows、Xbox One 系列主机和 Xbox Series 主机

另请参阅

XAccessibility
XClosedCaptionProperties
XGameRuntimeTypes