← back ~/writing/a-type-system-for-color.md
$ cat a-type-system-for-color.md
2025-10-04 #design 6 min read

A type system for color

Hex codes are an assembly language. They are precise and they are useless for thinking with.

I want a color system where the names mean something, where the relationships are explicit, and where I cannot write a contrast bug because the types won’t let me.

The shape

Once that’s typed, autocomplete becomes the design system.

What broke

OKLCH made this almost easy. Every step I’d previously eyeballed in HSL became math. The remaining 10% — gamut clipping, browser support, designers who insist on a specific hex — is the boring part.

I’d rather fight the boring part with types than fight the interesting part with vibes.

$ cd ../writing
~/writing/a-type-system-… [git: main] [200 OK] [UZT --:--]