Gradient maker

Smooth gradients that don't go grey and muddy in the middle. Copy the CSS, or save a PNG, smooth or dithered.

sRGB

OKLab

OKLCH

The three strips are the same colours blended three ways. sRGB mixes the screen's red, green and blue numbers, which often dips through grey. OKLab mixes how colours look, so lightness changes evenly. OKLCH also keeps colours vivid by going round the colour wheel instead of through the middle.

Colours
Blend in
Hue
Shape
Preview
CSS
PNG
× px

The CSS


    

Newer browsers use the second line, which blends in OKLCH or OKLab themselves. Older ones don't understand it, skip it, and use the first line instead: the same blend, spelled out in 13 steps.

Using it

Blue to yellow is the classic test: in sRGB it passes through a dull grey; in OKLCH it goes through purple and red, or through green the long way round. The dithered PNG uses only your exact colours, in a fine pattern, which keeps files small and suits screen printing and the look of this site.

↑ Top