How to use it
- 1
Start from a preset or set your own colour stops.
- 2
Choose linear, radial or conic and adjust the angle or shape.
- 3
Blend in OKLCH for smoother transitions between distant colours.
- 4
Copy the CSS; it includes an sRGB line for older browsers.
Why OKLCH blending looks better
Classic sRGB gradients pass through a dull grey middle when the end colours are far apart, for example blue to orange. Interpolating in OKLCH keeps the middle saturated. Browsers that do not support it use the sRGB line just above it.
Questions
Will the gradient slow my site?
No. CSS gradients are drawn by the browser and add no image download.
Can I put text on a gradient?
Yes, but check contrast at both ends with the contrast checker.
What is a conic gradient for?
Colour wheels, pie-chart style fills and angular light effects.
Updated:
