Design tokens, done properly.

A colour that passes 4.5:1 on white does not pass on a dark surface. So one value per colour is broken. Everything here carries a value per mode.

Colour. Pick your brand.

Status, neutral and accent colours follow from it. Each keeps a light and a dark value, and the dark one is generated until you take it over.

#
H
C
L

Generated ramps

Brand

Brand3b82f6

Status

Success16a34a
Errordc2626
Warningeab308
Info2563eb

Neutral

Neutral0a0a0a

Type. Choose two families.

Leading and tracking are computed per step. They are properties of size, not constants of the family, and one line-height across a scale is wrong at both ends.

Title font
Body font

Any Google family. Search is popularity-ordered, so the ones you have heard of come first.

Or start from a pairing
Base size16px

Body text. Every other step is a power of the ratio from here.

Ratio1.25

Wider ratios give headings more presence and run out of room faster on small screens.

Derived scale

Leading and tracking are computed per step, not set once. Larger text needs tighter leading and negative tracking; small text needs the opposite. A single line-height across a scale is the usual mistake.

StepSizeLeadingTracking
xs10px1.6500000000000001+0.005em
sm13px1.6500000000000001+0.002em
base16px1.54-0.002em
lg20px1.42-0.006em
xl25px1.33-0.011em
2xl31.5px1.25-0.019em
3xl39px1.19-0.027em
4xl49px1.1400000000000001-0.03em
5xl61px1.11-0.03em

Layout. Set the rhythm.

Spacing is dense where components live and sparse where pages breathe. Nested corners stay concentric. Elevation is shadow on light and lightness on dark.

Base unit4px

Every spacing and radius step is a multiple of this.

Border1px

1px reads as structure. 2px and up reads as a deliberate style choice.

Density

Multiplies the whole spacing scale, not individual values.

Radius×0
0
0
0
0
0
0

0 gives square corners throughout.

Elevation

Borders and surface tone carry it. On dark surfaces a shadow is nearly invisible, so each level also names the surface tone that carries it there.

0 · base
1 · subtle
2 · raised
3 · raised
Spacing

Linear at the small end where component padding lives, geometric at the large end where page rhythm does. A flat 4px ladder gives twenty interchangeable steps and none of the useful big ones.

3xs
3
2xs
5
xs
8
sm
10
md
15
lg
20
xl
30
2xl
40
3xl
60
4xl
80
5xl
120
Nested corners

An inner radius must be the outer radius minus the gap between them, or the two curves visibly drift apart. Left is computed, right uses the same radius for both.

Concentric · 0/0
Same radius · 0/0