Color Tokens
Replace hardcoded colors with semantic CSS variables that automatically work in light and dark modes:
Main brand • Buttons, links
Secondary • Alternative actions
Success • Confirmations
Error • Destructive actions
Warning • Alerts, caution
Info • Hints, help text
Background • Page/card surface
Variant surface • Hover states
Primary text • Body content
Muted text • Secondary info
Borders • Dividers, outlines
Primary container • Backgrounds
Using Color Variables
/* ✓ RIGHT - Use CSS variables */
.button-primary {
background: var(--a-color-primary);
color: var(--a-color-on-primary);
border: none;
}
/* ❌ WRONG - Hardcoded colors */
.button-primary {
background: #007bff;
color: white;
}