CSS custom properties let the same palette feed plain CSS, Tailwind, and component libraries. Palettebro names tokens by role (primary, on-surface, surface-container) so you do not invent a second naming scheme at export time.
Export from the generator
Build a palette in the color palette generator, review derived tokens on Color Utilities, then download CSS variables. Check contrast in the WCAG contrast checker before you paste them into a codebase.
Primitive vs semantic
- Primitives: stepped hues such as
--color-primary-50…--color-primary-950. - Semantic aliases:
--color-on-surface,--color-surface,--color-outlinethat point at primitives. - Themes: swap values on
:rootvs.dark(or adata-theme) while keeping the same names in components.
Use them in CSS
.card {
background: var(--color-surface-container);
color: var(--color-on-surface);
border: 1px solid var(--color-outline-variant);
}Components should read semantic aliases, not a one-off hex. When the generator output changes, you replace the variable block — not every rule.