Skip to content
Design Tokens

Extract design tokens from any website

How to capture a website's colors, typography and spacing as design tokens and bring them into your project as DESIGN.md or tokens.json.

8 min readUpdated: 10 July 2026
Design tokensWorkflowStyle Extractor
nordfeld.studio10 values4 roles
  • primary#1f5eff
  • surface#f8fafc
  • text#0f172a
  • border#e2e8f0

Design tokens are the smallest building blocks of a design system: colors, font sizes, spacing and radii as named values. Keep them tidy and you keep a product consistent. This guide shows how to capture tokens from an existing website and reuse them.

The short version
  • A style extract is an inventory, not theft: the colors, fonts and spacings of a page as a list.
  • It helps most before a relaunch, when taking over someone else's project and when checking your own design system.
  • Raw values are only the start. Reducing them to a few roles is what turns them into a system.
  • Do not copy other brands. Analysing is fine, adopting is not.
01

Why tokens instead of fixed values

When colors and spacing are hard-wired all over the project, every change turns into a search. Tokens gather these values in one place. A single adjustment then takes effect everywhere.

Tokens also improve collaboration between design and development, because both sides speak the same language: primary, background, spacing-4 instead of a random hex number.

Hard-wired values
  • #1f5eff sits in forty places across the project.
  • A rebrand means search, replace and hope.
  • Nobody knows whether #1f5dfe is a second blue or a typo.
Tokens
  • --primary sits in one place, the name is what gets used.
  • A rebrand is one changed line.
  • The name says what the colour is for, not what it looks like.
Name by job, not by looksblue-500 does not survive a rebrand, primary does. The moment the brand turns green, blue-500 is either misnamed or there is a second truth in the project.
02

What can be extracted

From a website you can derive the core colors, the font families, typical font sizes as well as spacing and corner radii. Together they form a solid foundation for your own theme.

Color accuracy matters. Analyzing the code alone often is not enough, because many colors only become visible in the rendered image. Checking against a screenshot raises the hit rate.

01PageOne URL, rendered.
02Raw valuesEverything in the stylesheet.
03RolesMerge them and name them.
04VariablesOnly here they are tokens.

Four steps from the page into the code. The third one is the only one no tool does for you.

The stylesheet is not the whole pictureStates like hover, focus or error often do not show up in an extract because they are not visible on load. Check them once by hand, otherwise exactly the colour you need most is missing later.
03

Output as DESIGN.md or tokens.json

For people a DESIGN.md works well, describing colors, typography and notes on implementation. For tools and build processes a tokens.json is more practical because it can be read by machines.

In Tailwind you can store the tokens as CSS variables and reference them in the configuration. That keeps your theme centrally controllable.

@theme {    --color-primary: #1f5eff;  --color-surface: #f8fafc;  --color-border: #e2e8f0;  --spacing: 4px;} <div className="bg-surface text-primary p-4" />
The variables in the stylesheet, the names in the theme layer.
One source, two outputsMaintain the values in tokens.json and generate the DESIGN.md from it. The other way round, the two files drift apart within three weeks and nobody notices.

Few roles beat many values.

A list of hex numbers is an inventory. It becomes a system only once every value has a job.

ColourFour roles instead of sixteen values.
TypographyOne scale, no one-offs.
SpacingA four pixel step is enough.
04

Fast to a result

With the library's Style Extractor you enter a URL and get colors, typography and spacing prepared, ready to adopt. That is a good starting point which you then adapt to your brand.

Read out16 colours, many nearly identical.
#1f5eff#1f5dfe#2060ff#0f172a#0f172b#111827#ffffff#fefefe#f8fafc#f7f9fb#e2e8f0#e3e8f1#64748b#65748a#94a3b8#1f5eff
KeptFour roles, each with one job.
  • primaryPrimary#1f5eff
  • surfaceSurface#f8fafc
  • textText#0f172a
  • borderBorder#e2e8f0

On the left, what a mid-sized page yields. On the right, what of it belongs in a project.

05

What an extract is not

An extract is a tool for understanding. It replaces neither design work nor permission to take someone else's work.

  1. Not a replacement for a design system. A list of values is not a decision yet. Only once you assign roles to them does it become something you can work with.
  2. Not a template for copying brands. The colors and fonts of another site belong to their brand. Analyse them, do not adopt them.
  3. Not the whole truth. What gets read is what sits in the stylesheet. Values that only appear through interaction are missing.

Take the structure with you, not the colors.

06

From extract to system

The real step comes after reading the values: turning many values into few roles.

  1. Merge duplicates. Colors differing by a few percent are almost always an accident. Pick one.
  2. Name the roles. Not blue 500, but primary, surface, text, border. Names survive a rebrand, values do not.
  3. Put spacings on a scale. A four pixel step is usually enough. In-between values are the reason nothing lines up later.
  4. Store them as variables. They only become tokens in code. Before that they are a note nobody maintains.

At the end of these four steps you do not have a longer list than before, you have a shorter one. That is the point: sixteen colours become four that somebody can explain.

A token nobody can name is not a token.

Share
Written by
Amelie RoesmannCreative directionLeonie RoesmannDesign engineering

We build websites and web apps at Systra Studios in Münster and put the building blocks from that work here. What you read comes from real projects, not from a brochure.

Systra Studios: web design from Münster

You know what matters.
The reading is the tool's job.

Enter a URL, get colours, typography and spacing. As a DESIGN.md for people or a tokens.json for your build.

  • Colours are checked against the rendered page.
  • Values close to each other get merged.
  • Output as markdown or JSON, both ready to copy.
Open Style Extractor
Result
  • primary#1f5eff
  • surface#f8fafc
  • text#0f172a
  • border#e2e8f0
TypographyAaInter · 16 / 20 / 28 / 40
FAQ

Frequently asked questions

Looking and analysing is fine, it is public in the browser anyway. Adopting is not: colour, type and imagery are a brand's appearance. Take the structure with you, meaning the number of roles and the shape of the scale, not the values.

Didn't find your question? We're happy to help.

Get in touch