How to Extract Design Tokens from Any Website
TL;DR: The fastest way to extract design tokens from a website is to scan its rendered styles, not its source CSS. Install CSS DNA, open the site, click Extract, and export the resulting colors, fonts, spacing, shadows and gradients as Tailwind, CSS variables, JSON, SCSS or Figma tokens.
What are design tokens?
Design tokens are the named, reusable values that define a product's visual language: the color palette, font families and type scale, spacing steps, border radii, shadows and gradients. Instead of hard-coding #4f46e5 in forty places, a token like --color-primary-600 gives the value a single source of truth that both designers (in Figma) and developers (in CSS or Tailwind) share.
Why extracting tokens by hand doesn't work
The obvious approach — open DevTools, click around, copy values — breaks down quickly on real sites:
- Minified and generated CSS. Modern sites ship class names like
css-1x2ab3or thousands of atomic utilities. The stylesheet tells you almost nothing about the system behind it. - Duplicates and drift. A page might use
#4f46e5,rgb(79,70,229)and#4e45e4interchangeably. Copying by hand, you'll record all three as different colors. - No sense of hierarchy. DevTools shows you one element at a time. It can't tell you which color is the brand accent and which appears once in a forgotten footer.
Scanning the computed styles of the rendered page solves all three: you see what the browser actually painted, deduplicated, and ranked by how often each value is used.
Step-by-step: extract tokens in two clicks
- Install CSS DNA. Add the free extension from the Chrome Web Store and pin it. It works in Chrome, Edge, Brave and Arc, needs no account, and runs entirely on-device.
- Open the website you want to study — a competitor, a reference design you admire, or your own product — and click the CSS DNA toolbar icon.
- Click Extract. CSS DNA scans the rendered page and returns:
- every color, deduped and ranked by usage, convertible between HEX, RGB, HSL and OKLCH;
- font families, weights, and the full type-size scale;
- spacing values, border radii, box shadows and gradients;
- near-duplicate warnings for colors that differ by a hair.
- Export. One click turns the extracted system into a Tailwind v3 config or v4
@themeblock, CSS custom properties, JSON, SCSS variables, or Figma / W3C design tokens.
Choosing an export format
| Format | Best for |
|---|---|
Tailwind config / @theme | Rebuilding the look in a Tailwind project — see the full website-to-Tailwind guide |
| CSS custom properties | Framework-agnostic codebases; drop into :root and go |
| JSON / W3C tokens | Token pipelines (Style Dictionary, Tokens Studio) and design-system tooling |
| SCSS variables | Legacy Sass codebases |
| Figma tokens | Syncing the palette and type scale into Figma variables |
| AI / DESIGN.md | An agent-ready brief for Claude, Cursor or Copilot to build in the extracted style |
Clean up before you commit
Extracted tokens mirror the site as it exists — including its inconsistencies. Two habits keep your token set healthy:
- Merge near-duplicates. If the scan flags
#4f46e5and#4e45e4as near-identical, pick one. CSS DNA's drift detection highlights these automatically. - Generate proper scales. Rather than keeping five arbitrary blues, generate a perceptually even 50–950 OKLCH tonal ramp from the brand color — the same structure Tailwind and modern design systems use.
Check contrast before you ship
A palette that looks great can still fail accessibility. Audit every text/background pair against WCAG 2 ratios and APCA (the WCAG 3 draft model) before the tokens land in production — here's how the two models differ and when they disagree.
Try it on any site, right now
Free to inspect. No account, no tracking — runs 100% in your browser.
Add CSS DNA to Chrome — Free