Theme builder

Every component here reads Material Design 3 colour roles (--md-sys-color-*). Pick your brand colours and the whole palette is generated for the light and the dark scheme with Google's own Material Design 3 colour algorithm. Adjust any role by hand, then download the CSS or copy the config for this registry.

Seeds

Preview

light scheme

Order summary

New

Three items ship tomorrow. Primary text sits on the surface; secondary and tertiary accents carry the badges.

StableBetaDeprecatedError

dark scheme

Order summary

New

Three items ship tomorrow. Primary text sits on the surface; secondary and tertiary accents carry the badges.

StableBetaDeprecatedError

Colour roles

Click a swatch to set that role by hand; × restores the generated value. Light and dark are edited separately.

RoleLightDark
--md-sys-color-primary
--md-sys-color-on-primary
--md-sys-color-primary-container
--md-sys-color-on-primary-container
--md-sys-color-secondary
--md-sys-color-on-secondary
--md-sys-color-secondary-container
--md-sys-color-on-secondary-container
--md-sys-color-tertiary
--md-sys-color-on-tertiary
--md-sys-color-tertiary-container
--md-sys-color-on-tertiary-container
--md-sys-color-error
--md-sys-color-on-error
--md-sys-color-error-container
--md-sys-color-on-error-container
--md-sys-color-background
--md-sys-color-on-background
--md-sys-color-surface
--md-sys-color-on-surface
--md-sys-color-surface-variant
--md-sys-color-on-surface-variant
--md-sys-color-surface-dim
--md-sys-color-surface-bright
--md-sys-color-surface-container-lowest
--md-sys-color-surface-container-low
--md-sys-color-surface-container
--md-sys-color-surface-container-high
--md-sys-color-surface-container-highest
--md-sys-color-outline
--md-sys-color-outline-variant
--md-sys-color-inverse-surface
--md-sys-color-inverse-on-surface
--md-sys-color-inverse-primary
--md-sys-color-scrim
--md-sys-color-shadow

Every text role reaches 4.5:1 on its background in both schemes.

Use it

  1. In this registry. Paste the config block into registry.config.json under site and rebuild: the site regenerates exactly this CSS. Roles you edited by hand travel in overrides.
  2. In your app. Import the token sheet first, then theme.css: the sheet defines every --md-sys-* property and this file overrides the colour roles, so every component on the page re-themes.
  3. Choosing a scheme. Do nothing and the visitor's OS preference picks light or dark. Set data-theme="light" or data-theme="dark" on <html> to force one; the file carries both.
The CSS