# V2 Colorblind-Safe Palette System

This runbook covers `TODOS.phase-72.72.13.1.2`: the V2UI colorblind-safe palette
system that provides accessibility-verified color alternatives for all UI
indicators.

## Runtime Surface

The palette system lives in V2UI:

- C++ header: `V2/ue/Source/V2UI/Public/V2ColorblindSafePalette.h`
- C++ source: `V2/ue/Source/V2UI/Private/V2ColorblindSafePalette.cpp`
- automation spec:
  `V2/ue/Source/V2Tests/Private/UI/ColorblindSafePalette.spec.cpp`
- contract:
  `V2/ue/Content/V2/UI/Accessibility/ColorblindSafePalette_V2_Contract.json`
- focused checker: `V2/ue/Tools/check-v2-colorblind-safe-palette.py`

`FV2ColorblindSafePalette::BuildDefaultCatalog` returns
`Accessibility.ColorblindSafePalette.V2`, a catalog of UI color tokens with
Default, Protanope, Deuteranope, Tritanope, and Monochromacy alternatives.
`FV2ColorblindSafePaletteCatalog::ResolveColor` maps a token and
`EV2UIColorPaletteMode` to the active color.

## Indicator Coverage

The catalog treats these roles as the required set of all UI indicators for V2
runtime signoff:

- Health
- Guard
- Stamina
- Super
- Warning
- Danger
- Success
- Objective
- QuestPrimary
- QuestOptional
- Interact
- Focus
- PingExcellent
- PingGood
- PingPoor
- TeamAlly
- TeamEnemy

Each `FV2ColorblindSafePaletteEntry` includes a stable `UI.Color.*` token, a
mode-specific color for each supported palette, a `NonColorShapeTokenId`, a
`TextFallbackTokenId`, and a verified minimum contrast ratio of at least 4.5:1.

## Non-Color Policy

Color is never the only state carrier. Every indicator must also expose a
non-color fallback shape and a text fallback token so HUD bars, warnings, quest
markers, pings, team identity, and focus states remain readable in monochromacy
and under simulated protanopia, deuteranopia, and tritanopia.

The catalog validation rejects:

- duplicate color tokens;
- duplicate indicator roles;
- missing non-color fallback or text fallback tokens;
- unverified entries;
- normalized RGBA values outside 0-1;
- entries below 4.5:1 minimum contrast;
- entries that reuse the default color for a colorblind-safe alternative.

## Verification

Run these checks after changing the palette:

```bash
python3 V2/ue/Tools/check-v2-colorblind-safe-palette.py
python3 V2/ue/Tools/check-v2-ui-module.py
python3 V2/ue/Tools/check-v2-ci-workflow.py
python3 V2/tools/validate-v2-docs.py
python3 -m py_compile V2/ue/Tools/check-v2-colorblind-safe-palette.py V2/ue/Tools/check-v2-ci-workflow.py
python3 -m json.tool V2/ue/Content/V2/UI/Accessibility/ColorblindSafePalette_V2_Contract.json
```

Automation test name: `V2.UI.Accessibility.ColorblindSafePalette.AssetContract`.

## Horde Gates

- `colorblind-safe-palette-source`
- `colorblind-safe-palette-indicators`
- `colorblind-safe-palette-alternatives`
- `colorblind-safe-palette-non-color-fallbacks`
- `colorblind-safe-palette-automation`
- `colorblind-safe-palette-ci-wired`
