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:
| Variable | Used for |
|---|---|
| --background / --foreground | Page surface and main text |
| --card / --popover | Raised surfaces and floating layers |
| --primary / --primary-foreground | Brand colour and the text drawn on it |
| --muted / --muted-foreground | Quiet fills and secondary text |
| --accent | Hover and highlighted rows |
| --border / --input / --ring | Lines, field borders and focus rings |
| --destructive / --success / --warning | Status colours |
| --radius | Base 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);}