I spent years writing my palettes as lists. A light theme, a dark theme, eight roles on each side, and the slightest change of background forcing me to realign the other seven by hand.

What a list of colours hides

A palette written as a list looks like a set of decisions. Counting both themes and the two contrast levels on my site, that came to a hundred and ten values. The decisions themselves came to five or six. All the rest was just the consequence, copied out by hand because the file did not know how to compute it.

The price is not paid at writing time, it is paid six months later. Faced with a hard-coded colour, nobody can say whether it is still right. All you know is that it was set one day, by eye, in a context that has been forgotten.

Two anchors, and relationships

The model fits in one sentence: a theme swaps only two values, the lightness of the background and that of the ink. Everything else follows from them. The greys of secondary text are fades of the ink. Cards and alternating bands are lightness offsets taken from the background.

My site now declares six things per theme. Not a single hard-coded colour left. What read like an inventory now reads like an intent.

Contrast stops being a palette

That is the consequence I had not seen coming, and it is the best one.

I had built a contrast setting that slid between two hand-tuned palettes. Thirty-six colours for two levels, and no way to add a third without redoing everything.

Once the colours are derived from the two anchors, lowering the contrast simply means bringing those anchors closer together. One variable, from zero to one. Everything follows. The site’s slider fits into a single number where it used to take two palettes.

Measured at both ends: 15:1 at the most contrasted, 4.6:1 at the softest, in both themes. The accessibility threshold is held by construction, not by the setting.

What I take from it

A colour library is not judged on the number of shades it produces. It is judged on the number of values it leaves you to write by hand.

Six per theme is a system. A hundred and ten is a spreadsheet somebody painted.