Skip to content

Color spaces

Reference2026-07-27

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 colorSpaceComponentsEditable in the picker
srgbr, g, b
srgb-linearr, g, b
hslh, s, l
hwbh, w, b
labL, a, b
lchL, C, h
oklabL, a, b
oklchL, C, h
display-p3r, g, b
a98-rgbr, g, b
prophoto-rgbr, g, b
rec2020r, g, b
xyz-d65X, Y, Z
xyz-d50X, 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 #38f
rgb(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)
rebeccapurple

A 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
componentsRaw channel values in that space. A missing channel is the string "none"
alpha01, always stored separately and never baked into hex
hexA 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 paint

Gamut 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:

AlphaFormat
16-digit — #3b82f6
below 18-digit — #3b82f680

Shorthand #RGB and #RGBA input is expanded to full length.


Practical guidance

SituationRecommendation
Web-only systemStay in srgb. Simplest, and what most downstream tooling expects
Perceptual scales (lightness ramps)Use oklch. Equal lightness steps actually look equal
Targeting modern displaysUse display-p3 and accept sRGB gamut mapping on the Figma canvas
Working with print or wide-gamut assetsprophoto-rgb and rec2020 store correctly, but the Figma preview will be gamut-mapped