Skip to content

ColorObject

Inline resolved color value per DTCG Color Module §4.1. colorSpace and components are required; alpha defaults to 1 (fully opaque) when omitted; hex is an optional 6-digit sRGB fallback (#RRGGBB — no alpha channel in hex). Consumers SHOULD prefer colorSpace + components for rendering.

Contains

Examples

colorSpace: srgb
components: [1, 0.4, 0]
alpha: 1
colorSpace: oklch
components: [0.7, 0.15, 50]

Used by

Further reading

  • Settings → Color — controls whether colors serialize as ColorObject, hex string, or CSS functional notation

Source

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