Gradient. Make CSS gradients that stay vivid in the middle instead of turning grey.
How it works
Choose the colours
Two or more stops. Drag the position of each one.
Choose how they blend
OKLCH keeps the middle bright. Compare it with plain sRGB blending side by side.
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
- Colour scale: One colour into a 50 to 950 scale for CSS or Tailwind.
- Colour converter: HEX, RGB, HSL and OKLCH, both ways.
- Box shadow: Soft, layered CSS shadows.