:root { --accent: #a855f7; ... }extend.colors config block ready for tailwind.config.jsSix tokens covers a launch-week SaaS. Add semantic tokens only when you actually render a toast.
// tokens.css
:root {
--bg: #0a0a0f;
--bg-card: #15151f;
--border: #2a2a3a;
--text: #f5f5fa;
--text-dim: #a0a0b8;
--accent: #a855f7;
}
// Then in any React component:
<button style={{background:'var(--accent)',color:'var(--text)'}}>
Click me
</button>
// tailwind.config.js (v3) or @theme block (v4)
export default {
theme: {
extend: {
colors: {
bg: '#0a0a0f',
card: '#15151f',
accent: { DEFAULT: '#a855f7', muted: '#c084fc' },
}
}
}
}
Use oklch() instead of hex so dark mode just shifts lightness without re-picking the hue:
:root {
--accent: oklch(60% 0.2 290);
}
@media (prefers-color-scheme: dark) {
:root { --accent: oklch(70% 0.18 290); }
}
oklch() over JavaScript-derived theme objects.Pick an accent. Get CSS variables, Tailwind config, JSON tokens, SCSS variables — all exports, one click.
Open the Color Palette Generator →