Color Token Exporter
Define a color palette once, export to CSS custom properties, Tailwind config, SCSS, LESS, design-token JSON, SwiftUI Color, or Android colors.xml.
:root {
--color-primary: #3b82f6;
--color-primary-hover: #2563eb;
--color-surface: #ffffff;
--color-surface-muted: #f5f5f5;
--color-text: #111827;
--color-text-muted: #6b7280;
--color-border: #e5e7eb;
--color-danger: #ef4444;
}Names get sanitized to kebab-case. Hex auto-expands #abc → #aabbcc.
How to use
- Pick a preset, or build your palette from scratch. Names get sanitized to
kebab-case. - Set a prefix that makes sense for your stack:
colorfor CSS,colors(or leave blank) for Tailwind, none for SCSS if you want plain$primary. - Switch format. Copy. Paste into your stylesheet, theme file, or assets catalog.
About this tool
ShowHide
A single source of truth for a color palette, with one-click export to whichever stack you're shipping. Add tokens by name and hex (3, 6, or 8 digit), pick a prefix (color, brand, surface etc.), and the output regenerates in your chosen format. CSS gives --color-primary custom properties under :root. Tailwind gives a theme.extend.colors block you can paste into tailwind.config.js. SCSS gives both $color-primary vars and a $colors map for map.get. JSON follows the Design Tokens Community Group { value, type } shape. iOS gives a SwiftUI Color extension; Android gives the colors.xml resource format with underscores. Presets get you started with a brand, neutral scale, or status colors.
Frequently asked questions
Why a prefix?
Prefixing prevents collisions and makes intent clear. --color-primary reads better than --primary when you also have spacing tokens, radius tokens, etc. For Tailwind, the tokens always go under extend.colors (the only key Tailwind builds colour utilities from), and the prefix becomes a nested group there: prefix brand gives bg-brand-primary. Leave the prefix empty for plain bg-primary.
Does the Design Tokens JSON match the W3C spec?
Close. It uses { value, type: 'color' } per token, which matches the Design Tokens Community Group draft. For strict W3C compliance you may need to nest tokens under a group object — but most tools (Style Dictionary, Specify, Cobalt) handle the flat shape fine and run their own transformations.
How do I keep exports in sync once designers and code both change colours?
Make one place authoritative and generate the rest from it. The moment a colour is edited in two formats by hand, they drift, and the drift is invisible until someone screenshots two surfaces side by side. Keep the source palette in version control, regenerate the platform files as a build step, and treat a hand-edited export as a bug rather than a shortcut.
What should the tokens be named?
After their role, not their appearance, wherever a theme might change: a token called blue-500 becomes a lie the moment dark mode makes it lighter, while surface or accent survives. Literal colour names are fine as the underlying palette, with the role tokens pointing at them — that indirection is what lets a theme swap without renaming anything.
Related tools
Color Name Finder
Find the closest CSS, Tailwind, or XKCD-survey color name for any hex/RGB input — ranked by perceptual distance in OKLab color space.
Color & CSS
Color Blindness Simulator
See how your image looks to people with each of 8 types of color vision deficiency (CVD).
Color & CSS
Color Palette from Image
Drop an image and the tool extracts a dominant-color palette via Canvas — copy HEX or grab the whole set.
Color & CSS
Tailwind Color Palette
The full Tailwind CSS v4 default palette — 22 hues × 11 shades, 50 through 950 — with click-to-copy as Tailwind class, HEX, or rgb().
Color & CSS
CSS Gradient Generator
Build linear or radial CSS gradients with multi-stop colors and copy the code.
Color & CSS
Material Design 3 Tonal Palette
Generate a Material Design 3 tonal palette (tones 0–100) from any source color, with contrast against black/white and CSS/Tailwind/JSON export.
Color & CSS