Skip to content
Skip to Content
ComposerKit

Theme editor

Pick brand colors and export a DESIGN.md and CSS tokens that keep every component readable in light and dark modes.

Pick a seed color for each role. The editor recomputes all neutral and accent tokens in packages/composerkit/DESIGN.md, preserves semantic chart scales (chart-*) as fixed tokens so data series keep distinct hues, and checks every text-and-surface contrast pair before unlocking export.

on(seed change)
  give every non-fixed token in packages/composerkit/DESIGN.md its role hue and chroma
  keep chart-1..6, chart-up, chart-down, chart-heat-low, and chart-heat-high fixed
  set lightness so luminance matches the default theme
  check text and surface pairs in light and dark against WCAG 4.5:1 and APCA
  while a pair fails
    adjust text lightness or opacity and list the correction
  if a pair still fails
    block the export

Seed colors

Each token takes its role's hue and chroma. Its lightness then moves until its luminance matches the default theme. The bar under each seed is its OKLCH ramp. 0 of 272 tokens differ from the default.

Preview

Preview mode

Contrast limits

All 76 text and surface pairs meet WCAG 4.5:1 and their APCA limit. No pair needed a correction.

The APCA limit is Lc 60, or the default theme's value where that is lower, so a brand theme never reads worse than the default.

Export

Use the export

  • Replace DESIGN.md: save the exported DESIGN.md over packages/composerkit/DESIGN.md, then run pnpm --filter composerkit export:design to lint contrast and regenerate src/styles/design-tokens.css.
  • Import CSS overrides directly: the theme CSS file sets --color-light-* and --color-dark-* variables. Import it after @import "../styles/globals.css" in your application stylesheet.
  • Consume W3C design tokens: the JSON export follows the W3C Design Tokens format (version 2025.10).

Read the Theming guide for nested .light and .dark scoping, chart tokens, and grid surface overrides.

On this page