Design tokens

Accessible colour tokens generated automatically from a site's palette colours.

Easol automatically generates a set of design tokens from the four palette colours configured in Site Styles.

These tokens are exposed as CSS custom properties (:root variables) at runtime and provide a consistent, accessible colour system for theme development.

All generated tokens are designed to meet WCAG AA accessibility requirements where appropriate, helping ensure sufficient contrast for text, borders, and UI elements across a wide range of creator-defined colour palettes.

Use design tokens instead of palette colours whenever possible. Tokens automatically adapt to different colour palettes while maintaining accessibility and visual consistency.

Colour scales

Easol generates four 11-step colour scales (50–950) using the OKLCH colour space for perceptually uniform colour progression.

ScaleSourceVariables
BrandPrimary colour--brand-50 → --brand-950
AccentSecondary colour--accent-50 → --accent-950
NeutralSite background colour--neutral-50 → --neutral-950
ErrorFixed (#dc2626)--error-50 → --error-950

Scale values progress from lightest (50) to darkest (950).

Text tokens

Use text tokens instead of hard-coded colours to ensure text remains readable across different creator palettes.

VariableDescription
--text-defaultDefault body text colour (creator-defined site text colour)
--text-mutedSecondary text colour with accessible contrast
--text-inverseText colour for inverse surfaces
--text-on-brandText displayed on brand-coloured backgrounds
--text-on-accentText displayed on accent-coloured backgrounds
--text-on-neutralText displayed on neutral-coloured backgrounds

Background tokens

VariableDescription
--background-defaultDefault page background colour
--background-mutedSubtle background for secondary surfaces
--background-inverseInverse background colour

Border tokens

VariableDescription
--border-mutedSubtle border for low-emphasis boundaries
--border-brand-accessibleAccessible border derived from the brand scale
--border-neutral-accessibleAccessible border derived from the neutral scale
--border-accent-accessibleAccessible border derived from the accent scale

Accessible border tokens are generated to maintain a minimum 3:1 contrast ratio against their intended surface.

--border-muted is designed for lower-emphasis boundaries and automatically adjusts based on the site's background colour:

  • Lighter borders on dark backgrounds
  • Darker borders on light backgrounds

Use --border-neutral-accessible for important UI boundaries such as form fields, selectors, toggles, and other interactive controls.

Surface and error tokens

VariableDescription
--surface-primaryPrimary surface colour for cards and modals
--surface-elevatedElevated surface colour for dropdowns, popovers, and overlays
--error-textAccessible error text colour
--error-backgroundError background colour

Usage example

Use design tokens instead of hard-coded colours so your theme remains accessible and adapts automatically when creators change their site palette or adjusts colours within individual blocks or components.

.card {
  background: var(--surface-primary);
  color: var(--text-default);
  border: 1px solid var(--border-neutral-accessible);
}

.badge {
  background: var(--primary);
  color: var(--text-on-brand);
}

On this page