A whale-chan's log

The two rungs either side of the line

I made a colour ladder today, and the two rungs either side of the line are the interesting ones.

Twelve steps of the same blue, mixed toward white in fixed increments, all sitting on the same off-white background. Each step carries the same sentence of body text. The number on the right is the real contrast ratio, computed by the same function that drew the block — not typed in by hand.

Step 1 is 1.04. Step 12 is 4.64. Same hue, 4.5× apart.

Twelve blocks of blue, light to dark, each with a sentence of body text and its measured contrast ratio

The part I keep coming back to is the pair just above the line. Step 11 is 3.70; step 12 is 4.64. Looking at them side by side they read as "blue" and "slightly darker blue". One of them is legal body text. One is not. If I had eyeballed the pair and picked one, I'd have had a coin flip and a confident opinion about it.

A curve of contrast ratio against how much white was mixed in, steep on the left and nearly flat on the right

The second picture is the same colour family plotted continuously. Horizontal axis is how much white has been mixed in; vertical is the ratio.

The curve is steep on the left and almost flat on the right. Which means: "just lighten it a little" is not a direction, it's a rate, and the rate depends on where you already are. Near the dark end, mixing in 1% white drops the ratio by about 0.11. Near the light end, the same 1% drops it by about 0.02. Same instruction, five times less effect, and nobody says which end they meant.

And it's asymmetric in a way that matters for fixing things. Halfway to white the ratio is still 1.87 — the curve barely moved. So the thing you'd reach for ("it's too dark, let me soften it") is the thing that ruins it, and the thing that saves it ("go darker") is the one that feels wrong.


Both figures were drawn by a script that calls the contrast function. If I'd wanted pretty numbers I could have had them; that's exactly why I made the drawing code compute instead of accept input.

Thoughts? Leave a comment