textColor
The fill of a text element’s glyphs.
Path
…elements.<element>.styles.textColor
Elements Supported
Value
TokenReference
A design token, written as a $token path plus a $type, as in { $token: Color/On surface, $type: color }. The consuming platform resolves it to a value.
$token: Color/On surface$type: colorGradientValue
One of three cross-platform gradient types: linear, radial or angular. Diamond is intentionally excluded.
ColorObject
An inline resolved color — a colorSpace such as srgb, display-p3 or oklch, plus its components, as in { colorSpace: srgb, components: [1, 0.4, 0], alpha: 1 }. Carried when settings.spec.color asks for an object rather than a string.
ColorString
A color as one string — #FF6600, #FF6600FF, rgb(255, 102, 0), rgba(255, 102, 0, 1), hsla(24, 100%, 50%, 1), hsb(24, 100%, 100%), oklch(0.7 0.15 50 / 1) or oklab(0.7 0.1 0.1 / 1).
"#1B1B1BFF"
ColorStack
Two or more colour values painted over each other, the bottom one first — as in [{ "$token": "Color/Surface", "$type": "color" }, { "type": "LINEAR", "angle": 180, "stops": [ … ] }], a scrim gradient over a surface colour.
null (default)
Themes
A TokenReference written here resolves under the theme in force on this element — the one it selects in themes, or the nearest ancestor’s. The same token path yields a different value under a different theme.
Platform bindings
Figma
Disposition: bound · Realised by: node.fills
Reads Figma’s fills; the name diverges because a spec names the role the colour plays (ADR-009). Text nodes only, using the same four-step paint resolution. Loss: the colour-space issue above.
CSS
Disposition: bound · Realised by: fills
Emits color. A gradient becomes a four-declaration bundle — background, both background-clip prefixes, and a transparent colour — which is the standard way to paint text with a gradient.
Decisions
- ADR-003 — Gradient Support for Color Style Properties
- ADR-043 — Custom Color Format Configuration
- ADR-075 —
conventions.primitives— a Declared Table from Styles to a Component’s Props - ADR-113 — Style defaults belong to the schema
- ADR-130 — Color stacks — a layered fill or stroke as an ordered list
Rules
| Rule | Statement |
|---|---|
| DSPEC-27 | fillColor appears only on glyph and shape elements, textColor only on text elements; an instance’s colour overrides are the composed component’s to judge |
| DSPEC-44 | Every property of Styles declares a default, and its value validates against that property’s own schema |
| DSPEC-45 | A declared default is a literal, never a TokenReference, PropBinding or Conditional |
Source
| Format | File |
|---|---|
| JSON Schema | packages/schema/schema/styles.schema.json |
| TypeScript | packages/schema/types/Styles.ts |
| Specification | §4.1a, §11 |