Riff / Built on the open web / Styling

oklab

Mixes the filament's colour from red through amber to white without muddy midtones.

A post with its tracks listed, and the player bar along the bottom of the screen
The filament: red when quiet, amber at working temperature, near white on the peaks.

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

Links open the source at the commit this page was published from.

Reference: oklab on MDN.