Design Tokens Generator

Turn a base colour into a full tint/shade ramp and exportable design tokens.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A design tokens generator that turns one or more brand colours into a complete, production-ready token set: full tint and shade ramps, semantic surface and text tokens for light and dark themes, radius and spacing scales, live WCAG contrast checks, and one-click exports as CSS variables, JSON, Tailwind config or SCSS. It is for front-end engineers, design-system maintainers and indie developers who want a consistent colour system without hand-tuning a dozen hex values or wiring up a heavyweight tooling pipeline.

Pick a brand colour and the tool instantly expands it into an 11-step ramp — from a near-white 50 tint down to a near-black 950 shade — so you get backgrounds, hover states, borders, text colours and pressed states that all belong to the same hue. Add as many colours as your system needs (primary, accent, neutral, success, danger and so on), rename them, randomise to explore, and copy any individual swatch with a click. Everything is auto-saved in your browser and works fully offline, so it is safe for confidential brand work.

How it works

Each base colour is converted from hex to HSL. The tool keeps the hue and saturation and remaps the lightness onto a fixed, perceptually-spaced scale of eleven steps. Saturation is gently boosted at the lightest and darkest ends so the colour keeps its character instead of washing out to grey, and the step whose lightness is closest to your original colour is ringed — that is the one most people think of as “the brand colour”. The semantic layer adds surface and text tokens for both light and dark themes, plus radius and spacing scales derived from the base values you set. The CSS export emits a prefers-color-scheme media query and a [data-theme="dark"] selector so the dark theme works automatically or with a manual toggle. Throughout, contrast is measured with the WCAG relative-luminance formula and graded AAA / AA / AA-Large / Fail in real time.

Example

Start with a primary of #4f46e5. The generator produces an indigo ramp where 50 is a pale lavender tint for page backgrounds, 500-600 sits on your brand indigo, and 900-950 give deep shades for headings and borders. Add an accent of #06b6d4 and a neutral grey, toggle the dark preview, and the contrast badge confirms your light text reads at better than 12:1 on the dark surface. Switch the export to Tailwind and paste the theme extension into tailwind.config.js to use classes like bg-primary-50, text-primary-700 and border-accent-300 immediately — or choose JSON to feed the same values into Style Dictionary or your own build step.

StepRoleTypical use
50 to 200Light tintsBackgrounds, subtle fills, hover surfaces
300 to 400Mid tintsBorders, disabled states, secondary fills
500 to 600AnchorButtons, links, the core brand colour
700 to 950ShadesText on light, pressed states, deep borders

Every value is computed in your browser — no colours are uploaded or stored on a server.

Ad placeholder (rectangle)