Skip to content

fillColor

The fill of a glyph or vector shape.

Path

…elements.<element>.styles.fillColor

Elements Supported

ellipse · glyph · line · polygon · star · vector

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

GradientValue

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-013). A gradient takes its own path; otherwise the same four-step paint resolution. On an instance the target is the first fillable descendant, found by walking the subtree. Loss: the colour-space issue above, and an instance with no fillable descendant drops the value silently.

CSS

Disposition: approximated · Realised by: fills

The CSS property depends on the element type: a glyph or vector takes background-color, an untyped legacy element takes fill, anything else takes background. Loss: a gradient fill on an untyped element is skipped entirely, because an inline SVG paint has no gradient equivalent.

Decisions

  • ADR-013 — Add fillColor style property for icon elements
  • ADR-017 — Rename icon Element Type to glyph
  • 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
  • ADR-131 — A library declares which paint property colours its glyphs

Rules

RuleStatement
DSPEC-27fillColor 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-44Every property of Styles declares a default, and its value validates against that property’s own schema
DSPEC-45A declared default is a literal, never a TokenReference, PropBinding or Conditional
DSPEC-84A producer MUST read a glyph’s colour from the paint property glyphs.colorProperty names, treating an absent declaration as fills, and MUST record what it reads as fillColor whichever property carried it

Source

FormatFile
JSON Schemapackages/schema/schema/styles.schema.json
TypeScriptpackages/schema/types/Styles.ts
Specification§4.1a, §11