Color spaces
DAES stores colours in the DTCG object form — a colour space plus raw components — so a wide-gamut colour is not flattened to hex on the way in.
Supported spaces
All 14 can be stored, exported, and converted.
DTCG colorSpace | Components | Editable in the picker |
|---|---|---|
srgb | r, g, b | ✅ |
srgb-linear | r, g, b | — |
hsl | h, s, l | ✅ |
hwb | h, w, b | — |
lab | L, a, b | — |
lch | L, C, h | — |
oklab | L, a, b | — |
oklch | L, C, h | ✅ |
display-p3 | r, g, b | ✅ |
a98-rgb | r, g, b | — |
prophoto-rgb | r, g, b | — |
rec2020 | r, g, b | — |
xyz-d65 | X, Y, Z | — |
xyz-d50 | X, Y, Z | — |
The four picker spaces have sliders. The other ten are entered as text and are preserved exactly.
Accepted input
Any CSS colour string that parses and resolves to one of the 14 spaces:
#3b82f6 #3b82f6ff #38frgb(59 130 246) rgba(59, 130, 246, 0.5)hsl(217 91% 60%) hwb(217 23% 4%)lab(54% 20 -70) lch(54% 73 285)oklab(0.65 -0.02 -0.17)oklch(0.65 0.19 255)color(display-p3 0.2 0.5 0.9)color(rec2020 0.2 0.5 0.9)rebeccapurpleA string that parses into an unsupported space is rejected, not silently converted. This is intentional: a lossy conversion you did not ask for is worse than an error.
The stored object
{ "colorSpace": "oklch", "components": [0.65, 0.19, 255], "alpha": 1, "hex": "#2f7ff0"}| Field | |
|---|---|
components | Raw channel values in that space. A missing channel is the string "none" |
alpha | 0–1, always stored separately and never baked into hex |
hex | A 6-digit sRGB fallback, always present, for tools that only read hex |
Conversion to Figma
Figma paints are sRGB, 0–1 per channel. Applying a wide-gamut colour goes:
stored space → sRGB → gamut mapping → clamp 0–1 → Figma paintGamut mapping, not clipping. An out-of-sRGB P3 or OKLCH colour is nudged to the nearest in-gamut colour perceptually, instead of having each channel cut independently — which is what preserves the hue.
The stored token is unaffected: only the on-canvas rendering is mapped. Export still emits the original wide-gamut value.
alpha becomes the Figma paint’s opacity.
Display hex
The token tile shows:
| Alpha | Format |
|---|---|
1 | 6-digit — #3b82f6 |
below 1 | 8-digit — #3b82f680 |
Shorthand #RGB and #RGBA input is expanded to full length.
Practical guidance
| Situation | Recommendation |
|---|---|
| Web-only system | Stay in srgb. Simplest, and what most downstream tooling expects |
| Perceptual scales (lightness ramps) | Use oklch. Equal lightness steps actually look equal |
| Targeting modern displays | Use display-p3 and accept sRGB gamut mapping on the Figma canvas |
| Working with print or wide-gamut assets | prophoto-rgb and rec2020 store correctly, but the Figma preview will be gamut-mapped |