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

Specifies a set of unique event categories and lets PIX choose the colors to represent each category.

## Syntax

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

### Parameters

*i*   \
Type: BYTE

The index of the color.

### Return value

Type: UINT

Returns a UINT containing the color representing the category.

## Remarks

Use the PIX\_COLOR\* functions to specify colors to pass as metadata to a PIX event/marker API. Use [PIX\_COLOR](/reference/tools/pix3/functions/pix_color) to specify a particular color for an event. Or, use `PIX_COLOR_INDEX` to specify a set of unique event categories, and let PIX choose the colors to represent each category. `PIX_COLOR_INDEX` allows for eight distinct color indexes to be used. The function will wrap the index values using *i* % 8 to choose the index that will determine the appropriate color.\
The PIX\_COLOR\* functions can be used to determine the color parameter for a number of functions to represent how they will be displayed in a PIX chart. Those functions include the overloaded methods [PIXBeginEvent](/reference/tools/pix3/functions/pixbeginevent-overloads) and [PIXSetMarker](/reference/tools/pix3/functions/pixsetmarker-overloads).

## Requirements

**Header:** pix3.h

**Library:** pixevt.lib

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

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


## Related topics

- [PIX_COLOR](/reference/tools/pix3/functions/pix_color.md)
- [PIXSetMarker function](/reference/tools/pix3/functions/pixsetmarker.md)
- [PIXBeginEvent function](/reference/tools/pix3/functions/pixbeginevent.md)
- [PIXSetMarker reference](/reference/tools/pix3/functions/pixsetmarker_2.md)
- [PIXBeginEvent function reference](/reference/tools/pix3/functions/pixbeginevent_2.md)
