> ## 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_INDEX

> PIX_COLOR_INDEX

# PIX\_COLOR\_INDEX

指定一組唯一的事件類別，並讓 PIX 選擇代表每個類別的色彩。

## 語法

```cpp theme={null}
UINT PIX_COLOR_INDEX(  
         BYTE i  
)  
```

### 參數

*i*   \
類型：BYTE

色彩的索引。

### 傳回值

類型：UINT

傳回包含代表該類別之色彩的 UINT。

## 備註

使用 PIX\_COLOR\* 函式來指定要作為中繼資料傳遞給 PIX 事件/標記 API 的色彩。使用 [PIX\_COLOR](/zh-TW/reference/tools/pix3/functions/pix_color) 為事件指定特定色彩。或者，使用 `PIX_COLOR_INDEX` 指定一組唯一的事件類別，並讓 PIX 選擇代表每個類別的色彩。`PIX_COLOR_INDEX` 允許使用八個不同的色彩索引。此函式會使用 *i* % 8 循環索引值，以選擇決定適當色彩的索引。\
PIX\_COLOR\* 函式可用來決定許多函式的色彩參數，以表示它們在 PIX 圖表中的顯示方式。這些函式包括多載方法 [PIXBeginEvent](/zh-TW/reference/tools/pix3/functions/pixbeginevent-overloads) 和 [PIXSetMarker](/zh-TW/reference/tools/pix3/functions/pixsetmarker-overloads)。

## 需求

**標頭：** pix3.h

**程式庫：** pixevt.lib

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[PIX\_COLOR](/zh-TW/reference/tools/pix3/functions/pix_color)\
[PIXBeginEvent](/zh-TW/reference/tools/pix3/functions/pixbeginevent)\
[PIXSetMarker](/zh-TW/reference/tools/pix3/functions/pixsetmarker)\
[PIX3](/zh-TW/reference/tools/pix3/pix3_members)\
[PIX (NDA 主題)](/zh-TW/tools/tools-console/pix/pix)


## Related topics

- [PIX_COLOR](/zh-TW/reference/tools/pix3/functions/pix_color.md)
- [PIXSetMarker 函式](/zh-TW/reference/tools/pix3/functions/pixsetmarker.md)
- [PIXSetMarker 參考](/zh-TW/reference/tools/pix3/functions/pixsetmarker_2.md)
- [PIXBeginEvent 函式](/zh-TW/reference/tools/pix3/functions/pixbeginevent.md)
- [PIXBeginEvent 函式參考](/zh-TW/reference/tools/pix3/functions/pixbeginevent_2.md)
