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

# XHighContrastGetMode

> XHighContrastGetMode

# XHighContrastGetMode

Returns the current high contrast mode.

## Syntax

```cpp theme={null}
HRESULT XHighContrastGetMode(  
         XHighContrastMode* mode  
)  
```

### Parameters

*mode*   \_Out\_\
Type: [XHighContrastMode\*](/reference/system/xaccessibility/enums/xhighcontrastmode)

The current [high contrast mode style](/reference/system/xaccessibility/enums/xhighcontrastmode).

### Return value

Type: HRESULT

HRESULT success if *mode* contains the current [XHighContrastMode](/reference/system/xaccessibility/enums/xhighcontrastmode). Otherwise, returns an error code.\
For a list of error codes, see [Error Codes](/reference/errorcodes).

## Remarks

<Note>This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

For this function to be successful, closed captions must be enabled.
The user must enable the closed captions feature in the UI of the Game title.
If the user enabled closed captions, your Game title can flag the status of closed captions by calling [XClosedCaptionSetEnabled](/reference/system/xaccessibility/functions/xclosedcaptionsetenabled).

The following example demonstrates how to return the current high contrast mode.

```cpp theme={null}
XHighContrastMode highContrastMode;
if (SUCCEEDED(XHighContrastGetMode(&highContrastMode))
{
    // The game title can now use the enumeration result to set colors and other visual
    // options for the user interface.
}
```

## Requirements

**Header:** XAccessibility.h

**Library:** xgameruntime.lib

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

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[XAccessibility](/reference/system/xaccessibility/xaccessibility_members)

[XHighContrastMode](/reference/system/xaccessibility/enums/xhighcontrastmode)

[XClosedCaptionSetEnabled](/reference/system/xaccessibility/functions/xclosedcaptionsetenabled)


## Related topics

- [XHighContrastMode](/reference/system/xaccessibility/enums/xhighcontrastmode.md)
- [XAG 102: Contrast](/build/game-principles/accessibility/xag-deep-dives/xag-102-contrast.md)
- [XAccessibility](/reference/system/xaccessibility/xaccessibility_members.md)
- [High Contrast Mode](/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-high-contrast-mode.md)
- [GDK accessibility overview](/build/game-principles/accessibility/accessibility-overview.md)
