CSS Gradient Generator
Design smooth linear and radial gradients with up to six color stops, preview them live, and copy production-ready CSS.
Color stops
How to Create a Gradient
- Select Linear or Radial.
- For linear gradients, drag the Angle slider (0° goes up, 90° goes right, 180° goes down).
- Edit each color stop with the color swatch or by typing a HEX code, and set its position from 0% to 100%.
- Add up to six stops, or remove extras with ✕.
- Click Copy CSS or Download PNG.
Understanding the CSS Output
The tool outputs two lines. The first is a solid fallback color; the second is the gradient itself:
Paste it into any CSS rule, such as a hero section, button or card. Modern browsers support linear-gradient() and radial-gradient() without prefixes.
Gradient Examples
- Tech hero:
linear-gradient(135deg, #6C5CE7, #22D3EE) - Warm call-to-action:
linear-gradient(90deg, #F97316, #F43F5E) - Soft glow:
radial-gradient(circle, #FDE68A, #F59E0B)
Tips for Better Gradients
- Gradients between neighboring hues look smoother than opposite hues, which can turn grey in the middle.
- Add a middle stop to control where colors blend.
- Keep text on gradients readable — test the darkest and lightest areas with the Contrast Checker.
Related Learning Guides
Frequently Asked Questions
What is the difference between linear and radial gradients?
A linear gradient blends colors along a straight line at a chosen angle. A radial gradient blends outward from the center in a circle.
How many color stops can I add?
You can use between two and six color stops.
Why is there a solid background line in the CSS?
It is a fallback for any environment that cannot render gradients, so the element still has a sensible color.
Can I download the gradient as an image?
Yes. Click Download PNG to save a 1600 × 900 image of your gradient.
Do CSS gradients slow down a website?
No. CSS gradients are drawn by the browser and are usually lighter than image files.