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

# PIX_COLOR

> PIX_COLOR

Specifies a particular color for an event.

## Syntax

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

### Parameters

*r*   \
Type: BYTE

The red component of the color.

*g*   \
Type: BYTE

The green component of the color.

*b*   \
Type: BYTE

The blue component of the color.

### Return value

Type: UINT

Returns a UINT containing the specified color.

## Remarks

Use the PIX\_COLOR\* functions to specify colors to pass as metadata to a PIX event/marker API.
Use `PIX_COLOR` to specify a particular color for an event. Or, use [PIX\_COLOR\_INDEX](https://docs.xbox.com/reference/tools/pix3/functions/pix_color_index.md) to specify a set of unique event categories and let PIX choose the colors to represent each category.

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 [PIXBeginEvent](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginevent.md), [PIXScopedEvent](https://docs.xbox.com/reference/tools/pix3/functions/pixscopedevent.md), and [PIXSetMarker](https://docs.xbox.com/reference/tools/pix3/functions/pixsetmarker.md).

## Requirements

**Header:** pix3.h

**Library:** pixevt.lib

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

## See also

[PIX\_COLOR\_INDEX](https://docs.xbox.com/reference/tools/pix3/functions/pix_color_index.md)\
[PIXBeginEvent](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginevent.md)\
[PIXScopedEvent](https://docs.xbox.com/reference/tools/pix3/functions/pixscopedevent.md)\
[PIXSetMarker](https://docs.xbox.com/reference/tools/pix3/functions/pixsetmarker.md)\
[PIX (NDA topic)](https://docs.xbox.com/tools/tools-console/pix/pix.md)\
[PIX3](https://docs.xbox.com/reference/tools/pix3/pix3_members.md)


## Related topics

- [PIX_COLOR_INDEX](https://docs.xbox.com/reference/tools/pix3/functions/pix_color_index.md)
- [PIXSetMarker(UINT64, PCSTR, ...)](https://docs.xbox.com/reference/tools/pix3/functions/pixsetmarker.md)
- [PIXBeginEvent(UINT64, PCSTR, ...)](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginevent.md)
- [PIXSetMarker(UINT64, PCWSTR, ...)](https://docs.xbox.com/reference/tools/pix3/functions/pixsetmarker_2.md)
- [PIXBeginEvent(UINT64, PCWSTR, ...)](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginevent_2.md)
