CSS Gradient Generator
Make linear, radial and conic CSS gradients with OKLCH or OKLab blending and an sRGB fallback, then copy CSS, a Tailwind class or SVG, or download a PNG.
Colour stops
Click the bar to add a stop, drag a stop to move it. With a stop selected, arrow keys move it and Delete removes it.
Blend colours in
The same stops, blended three ways. Classic sRGB can turn grey or muddy between distant colours; OKLab keeps the brightness even and OKLCH keeps the colour strong. Browsers that don't know OKLab or OKLCH get an sRGB fallback that looks the same.
Text on top
- White text
- 2.1:1
- Too low
- Black text
- 4.2:1
- AA large text only
The lowest contrast anywhere on the gradient. WCAG AA needs 4.5:1 for body text and 3:1 for large text.
Code
background: linear-gradient(90deg, #0077a3 0%, #1178a2 1.56%, #1b79a1 3.13%, #2a7b9f 6.25%, #367d9c 9.38%, #3f7f9a 12.5%, #608591 25%, #959179 50%, #ad956b 62.5%, #c59959 75%, #dd9c41 87.5%, #e99d2f 93.75%, #ef9d22 96.88%, #f29e19 98.44%, #f59e0b 100%);
background: linear-gradient(in oklab 90deg, #0077a3 0%, #f59e0b 100%);Build a CSS gradient by eye and copy code that works everywhere. Pick linear, radial or conic, drag the colour stops, and choose how the colours blend: modern browsers can mix in OKLab or OKLCH, which avoids the grey dead zone of classic sRGB gradients, and the code comes with a matching sRGB fallback for older ones. You also see whether white or black text stays readable on top, and can export a Tailwind class, an SVG or a PNG of any size.