---
url: /en-us/standard/common/color.md
---
**Color Map is UInk's unified color structure**: a required sRGB color `fallback`, plus an optional HDR color. Ink colors, Shape strokes and fills, and page backgrounds all use it.

::: tip Levels

* **Core**: `fallback`.
* **Full**: `space` + `components` (HDR and precise color).
  :::

## Fields

| Field | Type | Requirement | Level | Description |
| --- | --- | --- | --- | --- |
| `fallback` | uint32 | Required | Core | sRGB color in `0xRRGGBB` format |
| `space` | string | Conditional | Full | Color space; appears paired with `components` |
| `components` | `Array<float32>(3)` | Conditional | Full | The three components in that color space |

Registered `space` values:

| Value | Components |
| --- | --- |
| `srgb` | Uses the sRGB transfer function; all three components are in the inclusive range from `0` to `1` |
| `scrgb` | Linear components; may exceed `1` to represent HDR highlights; must be finite numbers |

## Rules

* **COLOR-1** Writers must ensure `fallback` does not exceed `0xFFFFFF` and that it represents how the extended color should look on an SDR screen.
* **COLOR-2** Readers choose the color in the following order:
  1. Both `space` and `components` are missing: use `fallback`.
  2. Only one of them appears: the extended color is invalid; use `fallback`.
  3. `space` is unknown, `components` does not have length 3, any component is not a finite number, or an `srgb` component is outside `0`–`1`: use `fallback`.
  4. Otherwise, use the extended color.
* **COLOR-3** If `fallback` is greater than `0xFFFFFF`, readers may recover by using only the least significant 24 bits. When `fallback` is missing or of the wrong type, the color or style it belongs to is invalid and is handled by the error-tolerance rules of the block it belongs to.
* **COLOR-4** Gamut mapping and HDR / SDR tone mapping are up to the app; UInk does not guarantee pixel-identical colors across screens.

## Example

```jsonc
{
  "fallback": 16763904,                // 0xFFCC00
  "space": "scrgb",
  "components": [1.8, 0.65, 0.1]
}
```

## Fallback

| Capability the reader lacks | How it is shown |
| --- | --- |
| HDR (below Full) | Uses `fallback` |

## Related

* [Ink Block](../blocks/ink)
* [Shape Block](../blocks/shape)
* [Canvas Block](../blocks/canvas)
