AZ Tools

Color Token Exporter

Color

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.

Preset:
Tokens
Preview
primary
primary-hover
surface
surface-muted
text
text-muted
border
danger
Output
: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

  1. Pick a preset, or build your palette from scratch. Names get sanitized to `kebab-case`.
  2. Set a prefix that makes sense for your stack: `color` for CSS, `colors` (or leave blank) for Tailwind, none for SCSS if you want plain `$primary`.
  3. Switch format. Copy. Paste into your stylesheet, theme file, or assets catalog.

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 prefix becomes the key under `extend` — `extend.colors` is the default Tailwind convention, but you might want `extend.brand` or `extend.surface` for scoped palettes.
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.

Related tools