Skip to content

strokes

The colour of the element’s stroke.

Path

…elements.<element>.styles.strokes

Elements Supported

component · container · ellipse · line · polygon · rectangle · slot · 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/Outline
$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.strokes

The same four-step paint resolution, written to the node’s strokes. Loss: the colour-space issue above. Never applied to a text node, and absent from an instance’s key list.

CSS

Disposition: bound · Realised by: rule strokeRendering

Resolved jointly with

This key does not map on its own. Its rule’s ordered case table is linked above.

strokeRendering — CSS

Decisions

  • ADR-003 — Gradient Support for Color Style Properties
  • ADR-043 — Custom Color Format Configuration
  • 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-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-47Jointly resolved keys are stated as an ordered case table over a declared operand set, not as prose

Source

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