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

# High Contrast Mode

> High Contrast Mode

Dependent on your title's color scheme, there may be instances where your touch layouts are hard to see because they contrast poorly with your title running in the underlying stream. This can be especially problematic for gamers with low vision, color blindness, or other visual impairments. High contrast mode is a client setting that, when activated, adds additional strokes and button backplates to buttons styled with an [icon](/reference/system/touchadaptationkit/types/game-streaming-touch-icon), as well as modifies the [system colors](/reference/system/touchadaptationkit/layout/game-streaming-touch-color-palette#system-colors) to increase contrast.

For example, the standard layout and a solid light background color, with high contrast mode is **disabled**:

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-tak-standard-layout-hc-disabled.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=85031770174be52e17016d4180932b8c" alt="Standard touch layout with high contrast mode disabled" width="1748" height="732" data-path="images/gdk/features/common/game-streaming-tak-standard-layout-hc-disabled.png" />

And here is the same setup with high contrast mode **enabled**:

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-tak-standard-layout-hc-enabled.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=231efc670c084eab9743a002e7582c0b" alt="Standard touch layout with high contrast mode enabled" width="1720" height="720" data-path="images/gdk/features/common/game-streaming-tak-standard-layout-hc-enabled.png" />

While you can rely on the system defaults for high contrast mode styling, you can also include [high contrast mode variants for your custom assets](#custom-assets-for-high-contrast-mode) as well as [override the system colors](#overriding-system-colors-for-high-contrast-mode) to match the visual aesthetic of your game.

<a id="custom-assets-for-high-contrast-mode" />

## Custom assets for high contrast mode

When using [custom assets](/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-custom-assets) in your touch adaptation bundle, you can include high contrast asset variants for each of your standard contrast assets. These high contrast assets variants are then rendered whenever high contrast mode is enabled. Assets are marked as a high contrast variant by including a `.hc` suffix following your asset's name and preceding the file extension. For example, consider `myAsset.png` (left) and it's high contrast variant, `myAsset.hc.png` (right):

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-tak-hc-mode-asset-compare.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=885859b7d5033c88231c7d91379e3789" alt="Side-by-side of custom asset and high contrast custom asset variant" width="500" height="240" data-path="images/gdk/features/common/game-streaming-tak-hc-mode-asset-compare.png" />

When laying out your assets on disk, both standard contrast and high contrast assets are [organized by language and asset scale](/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-custom-assets#asset-files) as normal. For the above assets, the file structure might look something like this:

```
assets/
└───neutral/
    ├───@1.0x/
    │       myAsset.png
    │       myAsset.hc.png
    ├───@1.5x/
    │       myAsset.png
    │       myAsset.hc.png
    ├───@2.0x/
    │       myAsset.png
    │       myAsset.hc.png
    ├───@3.0x/
    │       myAsset.png
    │       myAsset.hc.png
    └───@4.0x/
            myAsset.png
            myAsset.hc.png
```

Within a layout, assets are referenced [without the filename extension](/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-custom-assets#referencing-assets-from-layouts) **and without the `.hc` suffix**. For example, a button styled with the assets from above might be configured like this:

```JSON theme={null}
{
    "type": "button",
    "action": "gamepadA",
    "styles": {
        "idle": {
            "faceImage": {
                "type": "asset",
                "value": "myAsset"
            }
        }
    }
}
```

Given this style, the touch adaptation kit will automatically select either `myAsset.png` or `myAsset.hc.png` dependent on if high contrast mode is disabled or enabled, respectively. This styling will yield the following when high contrast mode is **disabled**:

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-tak-hc-mode-asset-hc-disabled.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=17a73184c12252fab57e7be80a1e2022" alt="Touch layout with custom assets and high contrast mode disabled" width="158" height="146" data-path="images/gdk/features/common/game-streaming-tak-hc-mode-asset-hc-disabled.png" />

And the following when high contrast mode is **enabled**:

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-tak-hc-mode-asset-hc-enabled.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=16bbc1ca5209403e976582729e3bb4b9" alt="Touch layout with custom assets and high contrast mode enabled" width="216" height="178" data-path="images/gdk/features/common/game-streaming-tak-hc-mode-asset-hc-enabled.png" />

<a id="overriding-system-colors-for-high-contrast-mode" />

## Overriding system colors for high contrast mode

[Color palettes](/reference/system/touchadaptationkit/layout/game-streaming-touch-color-palette) within your touch layouts or [context file](/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-bundle#context) can be used to override the [system colors](/reference/system/touchadaptationkit/layout/game-streaming-touch-color-palette#system-colors). Controls implicitly sample the system colors when styling, meaning any overrides will effect the global styling of all controls (unless a control has it's own override within a custom `styles` block).

For example, the following layout overrides some of the system colors to achieve custom styling when high contrast mode is enabled:

```JSON theme={null}
{
  "$schema": "https://raw.githubusercontent.com/microsoft/xbox-game-streaming-tools/main/touch-adaptation-kit/schemas/layout/v4.0/layout.json",
  "styles": {
    "colors": {
      "highContrast": {
        "system_contentPrimary": "#ff00ffff",
        "system_contentSecondary": "#00ff00aa",
        "system_contrastPrimary": "#ff0000aa"
      }
    }
  },
  "content": {
    "left": {
      "inner": [
        {
          "type": "joystick",
          "axis": {
            "input": "axisXY",
            "output": "leftJoystick"
          }
        },
        {
          "type": "button",
          "action": "dPadRight",
          "styles": {
            "default": {
              "faceImage": {
                "type": "icon",
                "value": "map"
              }
            }
          }
        }
      ]
    },
    "right": {
      "inner": [
        {
          "type": "button",
          "action": "gamepadY"
        },
        {
          "type": "button",
          "action": "gamepadB"
        },
        {
          "type": "button",
          "action": "gamepadA"
        },
        {
          "type": "button",
          "action": "gamepadX"
        }
      ]
    }
  }
}

```

In the above layout, three color overrides are declared in the `highContrast` block that will only be applied when high contrast mode is enabled:

1. `system_contentPrimary` will override the styling applied to our joystick middle stroke and map icon tint.
2. `system_contentSecondary` will override the styling applied to our joystick fill.
3. `system_contrastPrimary` will override the styling applied to our joystick outer stroke and button backplates.

The above layout with high contrast mode **disabled**:

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-tak-hc-mode-color-palette-hc-disabled.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=a93237ada225eaa57786ab5b5aa021f2" alt="Touch layout with system color overrides and high contrast mode disabled" width="1060" height="456" data-path="images/gdk/features/common/game-streaming-tak-hc-mode-color-palette-hc-disabled.png" />

And with high contrast mode **enabled**:

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-tak-hc-mode-color-palette-hc-enabled.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=fa21e3242ff8a0f9303438421f600b21" alt="Touch layout with system color overrides and high contrast mode enabled" width="1066" height="456" data-path="images/gdk/features/common/game-streaming-tak-hc-mode-color-palette-hc-enabled.png" />

## Enabling high contrast mode

You can test high contrast mode on any of the [web](#web-cta), [android](#android-cta), or [windows](#windows-cta) content test applications (CTA).

<a id="web-cta" />

### Web CTA

High contrast mode can be enabled on the [web CTA](/build/core-features/common/game-streaming/game-streaming-web-content-test-application) by:

Clicking on your profile and navigating to "Settings" window:

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-web-cta-hc-mode-nav-1.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=649e4637aec162e9257726f415d68687" alt="Enabling high contrast mode on the web CTA step 1" width="763" height="1024" data-path="images/gdk/features/common/game-streaming-web-cta-hc-mode-nav-1.png" />

Navigating to "Accessibility" and checking "Enable high contrast in-game":

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-web-cta-hc-mode-nav-2.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=bbcc6f31f0926c93c0999ecb831b52a7" alt="Enabling high contrast mode on the web CTA step 2" width="1742" height="910" data-path="images/gdk/features/common/game-streaming-web-cta-hc-mode-nav-2.png" />

<a id="android-cta" />

### Android CTA (Deprecated)

High contrast mode can be enabled on the [android CTA](/build/core-features/common/game-streaming/game-streaming-android-content-test-application) by:

Clicking on your profile:

<img src="https://mintcdn.com/microsoft-4404708b/yWviP1jMKvfGdjTk/images/gdk/features/common/game-streaming-android-cta-hc-mode-nav-1.webp?fit=max&auto=format&n=yWviP1jMKvfGdjTk&q=85&s=ee6126012d36fc806b744660f76bc13e" alt="Enabling high contrast mode on the android CTA step 1" width="890" height="1636" data-path="images/gdk/features/common/game-streaming-android-cta-hc-mode-nav-1.webp" />

Checking "Enable high contrast mode":

<img src="https://mintcdn.com/microsoft-4404708b/sIrPFR_ir_sNKVEv/images/gdk/features/common/game-streaming-android-cta-hc-mode-nav-2.png?fit=max&auto=format&n=sIrPFR_ir_sNKVEv&q=85&s=4a073e2ed2c6ed6350486c806c073f95" alt="Enabling high contrast mode on the android CTA step 2" width="850" height="438" data-path="images/gdk/features/common/game-streaming-android-cta-hc-mode-nav-2.png" />

<a id="windows-cta" />

### Windows CTA (Deprecated)

High contrast mode can be enabled on the [windows CTA](/build/core-features/common/game-streaming/game-streaming-windows-pc-content-test-application) by:

Clicking on your profile:

<img src="https://mintcdn.com/microsoft-4404708b/nTPVBuko1tKGsd6P/images/gdk/features/common/game-streaming-windows-cta-hc-mode-nav-1.webp?fit=max&auto=format&n=nTPVBuko1tKGsd6P&q=85&s=1184e43b4f3e10b02bf0f502ef4209d0" alt="Enabling high contrast mode on windows CTA step 1" width="1687" height="1102" data-path="images/gdk/features/common/game-streaming-windows-cta-hc-mode-nav-1.webp" />

Checking "Enable high contrast mode":

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-windows-cta-hc-mode-nav-2.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=85b59da344732d48b1f82d5282811d63" alt="Enabling high contrast mode on windows CTA step 2" width="526" height="379" data-path="images/gdk/features/common/game-streaming-windows-cta-hc-mode-nav-2.png" />


## Related topics

- [XHighContrastMode](/reference/system/xaccessibility/enums/xhighcontrastmode.md)
- [XHighContrastGetMode](/reference/system/xaccessibility/functions/xhighcontrastgetmode.md)
- [XAG 102: Contrast](/build/game-principles/accessibility/xag-deep-dives/xag-102-contrast.md)
- [GDK accessibility overview](/build/game-principles/accessibility/accessibility-overview.md)
- [XAccessibility](/reference/system/xaccessibility/xaccessibility_members.md)
