1 min read
Warm dark mode with OKLCH
How to build a dark theme that feels warm instead of cold, using OKLCH color space.
design css
Most dark modes feel cold. Slate, zinc, gray — blue undertones everywhere.
For this site, I wanted something different: a dark mode that feels like a coffee shop at night, not a terminal window.
The secret: warm hue in your neutrals
Instead of oklch(0.20 0 0) (pure gray), use oklch(0.20 0.006 55).
That tiny amount of chroma at hue 55 (warm amber range) makes all the difference.
The palette
The Tailwind stone scale already has this built in. Stone-950 is #0f0e0c —
a near-black with just enough warmth to feel organic rather than clinical.