Riff / Built on the open web / Styling
oklab
Mixes the filament's colour from red through amber to white without muddy midtones.

How Riff uses it
The filament's colour is a three-stop ramp: a near-black red to a lit red, then to the amber accent, then to a pale yellow-white at the peaks. Each stop is a color-mix() in oklab, so the in-between colours keep an even perceived lightness, the way a heated wire brightens.
Why
The same mix in sRGB passes through darker, muddier midtones instead of a smooth brightening.
Without it
The glow colour is undefined and the wire draws in the inherited foreground colour.
Where
- plugins/riff/assets/riff.css, line 450
--riff-glow: color-mix(in oklab, color-mix(in oklab, color-mix(in oklab, rgb(74 16 0), rgb(190 58 12) calc(var(--riff-heat-red) * 100%)), var(--riff-accent) calc(var(--riff-heat-amber) * 100%)), rgb(255 232 190) calc(var(--riff-heat-white) * 100%)); - plugins/riff/assets/riff.css, line 464
.riff-wire {
Links open the source at the commit this page was published from.
Reference: oklab on MDN.