Skip to content
synccn

Theming

Every colour and radius comes from a small set of CSS variables.

Variables

Components never use raw colours. They use semantic tokens such as bg-primary and text-muted-foreground, which map to these variables:

VariableUsed for
--background / --foregroundPage surface and main text
--card / --popoverRaised surfaces and floating layers
--primary / --primary-foregroundBrand colour and the text drawn on it
--muted / --muted-foregroundQuiet fills and secondary text
--accentHover and highlighted rows
--border / --input / --ringLines, field borders and focus rings
--destructive / --success / --warningStatus colours
--radiusBase corner radius; sm, md, xl and 2xl derive from it

Your own theme

Open Theme Studio, start from a preset or pick a brand colour, base, radius, depth, surfaces and borders, then export CSS, a Tailwind v4 stylesheet or JSON. It checks contrast in both modes as you go. Colours are written in OKLCH, so light and dark versions keep the same hue and feel evenly bright.

globals.css
:root {  --radius: 0.625rem;  --primary: oklch(0.56 0.16 245);  --primary-foreground: oklch(0.99 0 0);}.dark {  --primary: oklch(0.66 0.15 245);}