Built-in toolFree · No signup
CSS Variables Theme Builder
Define a set of named color tokens with a light and a dark value for each, see them applied live to a preview card, and get a complete theme-switching CSS block: a :root default, an automatic @media (prefers-color-scheme: dark) override, and an optional [data-theme] block with a JS toggle function for manual switching that overrides the OS preference.
Share:
NameLightDark
Theme preview card
This card is styled entirely with your generated custom properties.
Accent buttonWas this tool helpful?
How to use
01
Edit your tokens
Start from the default set (background, surface, border, text, muted, accent) or add your own.
02
Set light & dark values
Pick a color for each token in both modes using the swatches.
03
Preview both modes
Toggle Light/Dark to see a real card styled with your generated variables.
04
Copy the CSS
Get the :root block, the prefers-color-scheme override, and the manual toggle JS.