> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PIX_COLOR

> PIX_COLOR

# PIX\_COLOR

为事件指定特定颜色。

## 语法

```cpp theme={null}
UINT PIX_COLOR(  
         BYTE r,  
         BYTE g,  
         BYTE b  
)  
```

### 参数

*r*   \
类型：BYTE

颜色的红色分量。

*g*   \
类型：BYTE

颜色的绿色分量。

*b*   \
类型：BYTE

颜色的蓝色分量。

### 返回值

类型：UINT

返回一个包含指定颜色的 UINT。

## 备注

使用 PIX\_COLOR\* 函数指定颜色，以作为元数据传递给 PIX 事件/标记 API。
使用 `PIX_COLOR` 为事件指定特定颜色。或者，使用 [PIX\_COLOR\_INDEX](/reference/tools/pix3/functions/pix_color_index) 指定一组唯一的事件类别，让 PIX 选择用于表示每个类别的颜色。

PIX\_COLOR\* 函数可用于为多个函数确定颜色参数，以表示它们在 PIX 图表中的显示方式。这些函数包括 [PIXBeginEvent](/reference/tools/pix3/functions/pixbeginevent)、[PIXScopedEvent](/reference/tools/pix3/functions/pixscopedevent) 和 [PIXSetMarker](/reference/tools/pix3/functions/pixsetmarker)。

## 要求

**头文件：** pix3.h

**库：** pixevt.lib

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[PIX\_COLOR\_INDEX](/reference/tools/pix3/functions/pix_color_index)\
[PIXBeginEvent](/reference/tools/pix3/functions/pixbeginevent)\
[PIXScopedEvent](/reference/tools/pix3/functions/pixscopedevent)\
[PIXSetMarker](/reference/tools/pix3/functions/pixsetmarker)\
[PIX（NDA 主题）](/tools/tools-console/pix/pix)\
[PIX3](/reference/tools/pix3/pix3_members)


## Related topics

- [PIX_COLOR_INDEX](/zh-CN/reference/tools/pix3/functions/pix_color_index.md)
- [PIXSetMarker function](/zh-CN/reference/tools/pix3/functions/pixsetmarker.md)
- [PIXBeginEvent 函数](/zh-CN/reference/tools/pix3/functions/pixbeginevent.md)
- [PIXBeginEvent 函数参考](/zh-CN/reference/tools/pix3/functions/pixbeginevent_2.md)
- [PIXSetMarker reference](/zh-CN/reference/tools/pix3/functions/pixsetmarker_2.md)
