Design Token Generator

Generate color scales (50-950), semantic tokens, and component preview from your palette

Presets
🎨 Primary
#3B82F6
🔵 Secondary
#10B981
✨ Accent
#F59E0B
📄 Background
#ffffff
🏷️ Surface
#f8fafc
✏️ Text
#0f172a
61 tokens

Color Scales(click to copy)

Primary
Secondary
Accent
Neutral

Semantic Tokens

Success
#0fbd4f
Error
#ec1313
Warning
#ec9c13
Info
#137fec

Component Preview

Live
Buttons
Form Elements
Email
you@example.com
Select
Choose option...
Alerts
Success:This is a success message.
Error:This is a error message.
Warning:This is a warning message.
Info:This is a info message.
Sarah Chen
Product Designer

This card uses your surface, text, and border tokens.

Badges
PrimarySecondaryAccentSuccessErrorWarning
Notification
New message
2 min ago
Progress

How it works

The Design Token Generator transforms a simple color palette into a complete, production-ready design system. Assign semantic roles to your colors and automatically get scales, tokens, and exportable code.

How does it work?

1. Choose your base colors

Assign 6 semantic roles: Primary (brand/CTAs), Secondary (secondary accents), Accent (highlights), Background (page background), Surface (cards/sections), and Text (typography). Start with a preset, generate a random palette, or fine-tune each color manually.

2. Automatic scales (50-950)

For each base color (Primary, Secondary, Accent), an 11-step scale similar to Tailwind CSS is generated. Lighter tints (50-400) are mixed with white and darker shades (600-950) are darkened with added saturation. Step 500 is always your original color. A neutral/gray scale is also derived from your text color.

3. Semantic tokens

Auto-generated tokens for Success, Error, Warning, and Info, each with light, base, and dark variants. Saturation automatically adjusts to match your palette's intensity.

4. Component preview

See your tokens applied to real UI components in real-time: buttons, forms, alerts, cards, badges, notifications, and progress bars.

5. Export

Export in 4 formats: CSS Custom Properties, Tailwind CSS config, SCSS variables, or JSON tokens (compatible with Style Dictionary and Figma Tokens).

💡 Practical Use Cases

Case 1: Building a corporate Design System

Your brand uses blue #3B82F6 as primary. You need the full scale for buttons, hover states, subtle backgrounds, etc.

→ Enter the color as Primary and get 11 shades (from light #EFF6FF to dark #1E3A5F)
→ Export as Tailwind config and paste directly into your project

Case 2: Implementing dark mode

You have a light palette and need to validate how it looks in dark mode.

→ Click "Swap" to automatically switch background and text
→ The component preview instantly shows how alerts, badges, and cards look in dark mode

Case 3: Tokens for Figma / Style Dictionary

You need to deliver color tokens to the design team in a standard JSON format.

→ Configure your palette → Export as JSON → Format is compatible with Style Dictionary and Figma Tokens
→ Includes full scales + semantic tokens with light/base/dark variants

Frequently Asked Questions

What are design tokens?
Design tokens are the smallest pieces of a design system — named values like colors, spacing, and typography that ensure consistency across platforms. This tool generates color tokens from your palette.
How are the color scales generated?
Each base color is mixed with white (for lighter tints 50-400) and darkened with added saturation (for shades 600-950). Step 500 is always your original color. This produces natural, usable scales similar to Tailwind CSS defaults.
What are semantic tokens?
Semantic tokens define colors by purpose rather than appearance: success (green), error (red), warning (amber), info (blue). Each includes light, base, and dark variants. Their saturation automatically matches your palette's overall intensity.
Can I import colors from the palette generator?
Yes. You can add ?colors=hex1-hex2-hex3-hex4-hex5-hex6 to the URL to load your colors directly. You can also share the full URL with anyone.
What export formats are available?
CSS Custom Properties (:root variables), Tailwind CSS theme config, SCSS variables, and JSON tokens (Style Dictionary format, compatible with Figma Tokens). All include full scales and semantic tokens.
Is this tool free?
Yes, completely free with no limits or account required.