Gradient. Make CSS gradients that stay vivid in the middle instead of turning grey.

How it works

  1. Choose the colours

    Two or more stops. Drag the position of each one.

  2. Choose how they blend

    OKLCH keeps the middle bright. Compare it with plain sRGB blending side by side.

  3. Copy the CSS

    A gradient with a fallback for browsers that don't support OKLCH blending yet.

Questions

Why do some gradients go grey in the middle?

Browsers blend in sRGB by default, which passes through dull, desaturated colours between opposite hues. Blending in OKLCH keeps the colours vivid.

Do all browsers support `in oklch`?

Current Chrome, Edge, Safari and Firefox do. The copied CSS includes extra stops so older browsers show the same gradient.

More design tools