Colors
Semantic colors that keep surfaces, content, and actions in balance across light and dark themes.
Semantic colors
Choose a token by its role, not its appearance. These swatches and their computed values follow the active theme; use the theme control to compare light and dark. Values are read directly from the stylesheet, not a separate palette.
--background
Computed in the active theme
--foreground
Computed in the active theme
--card
Computed in the active theme
--card-foreground
Computed in the active theme
--popover
Computed in the active theme
--popover-foreground
Computed in the active theme
--primary
Computed in the active theme
--primary-foreground
Computed in the active theme
--secondary
Computed in the active theme
--secondary-foreground
Computed in the active theme
--muted
Computed in the active theme
--muted-foreground
Computed in the active theme
--accent
Computed in the active theme
--accent-foreground
Computed in the active theme
--destructive
Computed in the active theme
--border
Computed in the active theme
--input
Computed in the active theme
--ring
Computed in the active theme
| Role | Tokens |
|---|---|
| Page | background, foreground |
| Contained surface | card, card-foreground |
| Floating surface | popover, popover-foreground |
| Primary action | primary, primary-foreground |
| Secondary surface | secondary, secondary-foreground |
| Supporting content | muted, muted-foreground |
| Highlighted surface | accent, accent-foreground |
| Errors and removal | destructive |
| Structural edges and controls | border, input |
| Keyboard focus | ring |
Pair surfaces with content
Foreground tokens belong to their matching surface. A foreground is not interchangeable with muted text; preserve the pair when placing a surface inside another surface.
Card
bg-card · text-card-foreground
Secondary
bg-secondary · text-secondary-foreground
Primary action
bg-primary · text-primary-foreground
Highlighted surface
bg-accent · text-accent-foreground
An upload could not be completed.
Error specimen: text-destructive on bg-destructive/10. Always describe the error in text, not color alone.
Use bg-card text-card-foreground for cards, bg-secondary text-secondary-foreground for secondary surfaces, bg-primary text-primary-foreground for the primary action, and bg-accent text-accent-foreground for highlighted surfaces.
For an error, use text-destructive on bg-destructive/10. Always describe the error in text, not color alone: “An upload could not be completed.”
Using color
Keep most of the interface neutral. Reserve the yellow primary color for emphasis and the main action. Use destructive for removal and errors, not decoration. Borders separate content; ring marks keyboard focus.
<div className="bg-card text-card-foreground shadow-outline">
<p className="text-muted-foreground">Supporting information</p>
<Button>Export video</Button>
</div>