Palette → Tokens
Turn a color palette into CSS variables, Tailwind config, and Token Studio JSON.
Drop an image to extract palettePNG, JPG, SVG — up to 10 MB
How to use Palette → Tokens
Add or extract colors
Type hex values, click swatches to use the color picker, or drop an image to auto-extract up to 6 dominant colors.
Name and reorder
Give each color a semantic name (brand, accent, neutral). Drag to reorder. WCAG contrast badges appear automatically.
Export any format
Switch tabs for CSS variables, Tailwind config, Style Dictionary, Tokens Studio, SCSS, or Figma Variables. Copy or download.
Frequently asked questions
Is Palette to Tokens free?↓
Yes, completely free. No sign-up, no limits.
Does my image get uploaded to a server?↓
No. All color extraction happens directly in your browser using the HTML canvas API. Your image never leaves your machine.
What is the scale generation algorithm?↓
Each base color is mixed with white (for steps 50–400) and black (for steps 600–950) using perceptual blending. The 500 step is always the exact input color.
What formats are supported?↓
CSS custom properties, Tailwind config (v3/v4 compatible), Style Dictionary (W3C format), Tokens Studio JSON, SCSS maps, and Figma Variables JSON.
Try other tools
View allLong-form guide
Turn a color palette into design tokens, in every format that matters
Palette → Tokens is the tool for the moment between "we have brand colors" and "we have a design system." Drop in 1–10 hex values (or an image to auto-extract them), name each swatch semantically, and the tool generates a 50–950 perceptual scale, runs WCAG contrast checks, and exports the whole thing in every token format your team might use.
How to use it
- Add or extract colors. Type hex values into the input field, click each swatch to use the color picker, or drop an image to auto-extract up to six dominant colors. Image extraction is client-side via canvas — your file never leaves your browser.
- Name semantically. Click a swatch's label to rename it. Use names that match how you'll reference the color in code:
brand,accent,neutral,success,error. The names flow through every export, so abrandcolor becomes--color-brand-500in CSS,brand.500in Tailwind, and{brand.500}in Tokens Studio. - Generate the scale. Toggle "Generate full 50–950 scale" to expand each color into eleven steps. The 500 step is always your exact input. Steps 50–400 are perceptually lightened versions; 600–950 are perceptually darkened. The math runs in OKLCH so the spacing feels even instead of muddy.
- Check contrast. Each scale step displays two WCAG badges: contrast against white (top) and against black (bottom). AAA is the highest contrast, suitable for body text. AA passes regular text. AA Large only passes for large text. FAIL is unreadable for body text — useful for backgrounds, not for foregrounds.
- Export. Switch tabs to see your palette in six formats: CSS custom properties, Tailwind config (v3 or v4), Style Dictionary (W3C DTCG), Tokens Studio JSON, SCSS maps, or Figma Variables JSON. Copy the active tab to clipboard or download as a file.
What the scale actually contains
Each scale follows the same pattern: 50 (very light), 100, 200, 300, 400 (lighter than base), 500 (your input), 600, 700, 800, 900, 950 (very dark). The lightening and darkening happen in OKLCH color space, which keeps perceived contrast roughly even between steps — so 100 looks the same distance from 200 as 800 looks from 900, instead of the bunched-up mid-tones you get from naive RGB blending.
For Tailwind v4 the export uses @theme blocks with OKLCH custom properties — you can drop the file straight into a project's main CSS. For v3 the export uses tailwind.config.js-compatible objects. For Style Dictionary the export follows the W3C Design Token Community Group format, the new lingua franca for cross-tool tokens. For Tokens Studio it follows their JSON shape exactly, ready to paste into the plugin.
When to reach for it
Two cases dominate. First: a brand sends you a few hex codes and you need a complete palette to design with. Drop the codes in, generate scales, and you have eleven steps per color in 90 seconds. Second: you've been using ad-hoc hex values across a project and want to consolidate into named tokens. Paste each color, give it a semantic name, export the right format for your stack, and you're suddenly maintainable.
A third smaller case: extracting a palette from a moodboard, screenshot, or photograph. Drop the image, get six representative colors, refine them by hand, ship the scale.
Palette → Tokens — инструмент для того момента между «у нас есть брендовые цвета» и «у нас есть дизайн-система». Вставь 1–10 hex-значений (или картинку для авто-извлечения), назови каждую плашку семантически — и инструмент сгенерирует перцептивную шкалу 50–950, прогонит проверки WCAG-контраста и экспортирует всё это в любом формате токенов, который может понадобиться команде.
Как использовать
- Добавь или извлеки цвета. Введи hex-значения в поле, кликни на плашку для выбора цвета или перетащи изображение для авто-извлечения до шести доминирующих цветов. Извлечение через canvas — на клиенте, файл не покидает браузер.
- Назови семантически. Кликни на лейбл плашки, чтобы переименовать. Используй имена, как ссылаешься в коде:
brand,accent,neutral,success,error. Имена идут во все экспорты —brandстановится--color-brand-500в CSS,brand.500в Tailwind,{brand.500}в Tokens Studio. - Сгенерируй шкалу. Переключатель «Generate full 50–950 scale» развернёт каждый цвет в одиннадцать шагов. Шаг 500 — точный ввод. 50–400 — перцептивно осветлённые версии; 600–950 — перцептивно затемнённые. Математика в OKLCH — шаги ощущаются равномерно вместо мутных средних тонов.
- Проверь контраст. На каждом шаге шкалы два WCAG-бейджа: против белого (сверху) и против чёрного (снизу). AAA — максимум, для body text. AA — обычный текст. AA Large — только крупный текст. FAIL — нечитаемо для body, годится для фонов, но не для foreground.
- Экспортируй. Переключай вкладки — палитра в шести форматах: CSS custom properties, Tailwind config (v3 или v4), Style Dictionary (W3C DTCG), Tokens Studio JSON, SCSS maps или Figma Variables JSON. Скопируй активную вкладку в буфер или скачай файлом.
Что внутри шкалы
Каждая шкала следует одному паттерну: 50 (очень светлый), 100, 200, 300, 400 (светлее базы), 500 (твой ввод), 600, 700, 800, 900, 950 (очень тёмный). Осветление и затемнение в OKLCH — перцептивный контраст между шагами примерно равный, и 100 ощущается на том же «расстоянии» от 200, что 800 от 900, без сжатости средних тонов, которую даёт наивное RGB-смешивание.
Для Tailwind v4 экспорт использует блоки @theme с OKLCH custom properties — файл можно вставить прямо в основной CSS проекта. Для v3 — объекты, совместимые с tailwind.config.js. Style Dictionary использует формат W3C Design Token Community Group, новый общий язык для межтул-токенов. Tokens Studio следует их JSON-форме, готов к вставке в плагин.
Когда это пригодится
Два главных кейса. Первый: бренд присылает несколько hex-кодов и нужна полная палитра для работы. Вставил коды, сгенерировал шкалы — одиннадцать шагов на каждый цвет за 90 секунд. Второй: ad-hoc hex-значения накопились по проекту и хочется консолидировать в именованные токены. Вставил каждый цвет, дал семантическое имя, экспортировал нужный формат — и проект внезапно поддерживаем.
Третий, поменьше: извлечение палитры из мудборда, скриншота или фото. Бросил картинку, получил шесть репрезентативных цветов, доработал руками, отгрузил шкалу.
Examples
brand: #3dc96c accent: #f59e0b
:root {
--color-brand-500: oklch(0.70 0.22 142);
--color-brand-600: oklch(0.62 0.19 142);
--color-brand-400: oklch(0.76 0.20 142);
--color-accent-500: oklch(0.74 0.16 85);
--color-accent-700: oklch(0.55 0.12 85);
--color-accent-300: oklch(0.85 0.12 85);
}brand: #3dc96c
@theme {
--color-brand-50: oklch(0.97 0.03 142);
--color-brand-500: oklch(0.70 0.22 142);
--color-brand-950: oklch(0.18 0.05 142);
}primary: #3b82f6
{
"primary": {
"500": { "value": "#3b82f6", "type": "color" },
"600": { "value": "#2563eb", "type": "color" },
"400": { "value": "#60a5fa", "type": "color" }
}
}