Skip to main content

Function: setTheme()

setTheme(theme?): void

Defined in: attributes/shape/fill/color/parser.ts:84

Registers named theme colors that can be referenced by name in any color string.

Theme entries take precedence over CSS named colors. Call with no argument (or an empty object) to clear all theme entries.

Parameters

theme?

Record<string, Color> = {}

Returns

void

Example

setTheme({ brand: "#ff6b35", accent: "oklch(70% 0.2 145)" });
// Later: fill: { type: "color", color: "brand" }