Gradient generator
Build a CSS gradient with up to five colors. The preview tells you whether text stays readable across all of it.
How to use it
- Choose Linear or Radial, and set the angle for a linear gradient.
- Set each color and drag its position. Add up to five colors, or remove extras.
- Check the preview: it shows the text color that reads best and its worst contrast on the gradient.
- Click Copy CSS and paste it into your stylesheet. The page address updates, so you can share the gradient.
How it works
Colors blend in sRGB between stops, the same way browsers draw CSS gradients by default, so the preview and the code match.
Text on a gradient can sit over any part of it, so the readability check samples 33 points along the gradient and reports the lowest WCAG contrast for white and for black text, then picks the better one.
Related tools
Questions
Where can I find ready-made gradients?
The gradient collections at colorfinch.com/gradients group ready-made gradients by color, from blue and purple to sunset and rainbow. Each opens here for editing.
How do I use the CSS?
Paste the background line into the CSS for any element, such as a section or button. It works in every modern browser without prefixes.
Why does my gradient look muddy in the middle?
Colors far apart on the wheel, like blue and yellow, pass through gray when they blend in sRGB. Add a stop in between, such as green, to keep the middle vivid.
What does the readability check mean?
It's the lowest contrast between the text color and any part of the gradient. 4.5:1 passes WCAG AA for normal text; 3:1 passes for large text only.
What's the difference between linear and radial?
A linear gradient changes along a straight line at the angle you set. A radial gradient spreads out in a circle from the center.