Skip to content

color

Controls how color values are serialized wherever a Color appears in spec output — including solid fill and stroke styles, text color, shadow color, and gradient stops. By default, colors are emitted as compact hex strings, but you can switch to any CSS functional notation, Figma’s native HSB model, or a fully structured object that preserves the original color space without lossy conversion.

Fileconfig/settings.yaml
Pathspec.color
Typeenum
DefaultHEXA

Options

ValueDescription
HEX6-digit hex string, like #FF6600. Discards alpha, so a translucent color reads as opaque
HEXA8-digit hex string with alpha, like #FF6600FF. Default — the most compact form that survives a round trip
RGBCSS rgb() functional notation, like rgb(255, 102, 0)
RGBACSS rgba() functional notation with alpha, like rgba(255, 102, 0, 1). This is what Figma labels “CSS” in its colour picker
HSLACSS hsla() functional notation, like hsla(24, 100%, 50%, 1)
HSBFigma’s native colour model, also known as HSV, like hsb(24, 100%, 100%). Not a CSS function
OKLCHCSS Color Level 4 perceptually uniform cylindrical model, like oklch(0.7 0.15 50 / 1)
OKLABCSS Color Level 4 perceptually uniform rectangular model, like oklab(0.7 0.1 0.1 / 1)
OBJECTFull ColorObject with colorSpace, components, alpha, and optional hex. Preserves colour space fidelity with no lossy conversion

Example

spec:
color: HEXA # Default — 8-digit hex strings carrying alpha

Scope

This is a formatting concern only — it doesn’t affect which colors are extracted or how they’re resolved from Figma. Token-bound colors are unaffected; spec.color applies to literal, unbound color values.

Further reading