> ## 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](/zh-TW/reference/tools/pix3/functions/pix_color_index) 指定一組唯一的事件類別，並讓 PIX 選擇代表每個類別的色彩。

PIX\_COLOR\* 函式可用來決定許多函式的色彩參數，以表示它們在 PIX 圖表中的顯示方式。這些函式包括 [PIXBeginEvent](/zh-TW/reference/tools/pix3/functions/pixbeginevent)、[PIXScopedEvent](/zh-TW/reference/tools/pix3/functions/pixscopedevent) 和 [PIXSetMarker](/zh-TW/reference/tools/pix3/functions/pixsetmarker)。

## 需求

**標頭：** pix3.h

**程式庫：** pixevt.lib

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

## 另請參閱

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


## Related topics

- [PIX_COLOR_INDEX](/zh-TW/reference/tools/pix3/functions/pix_color_index.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)
