How to create a CSS gradient
- Choose a type: linear, radial or conic.
- Set the angle (for linear and conic gradients).
- Adjust the color stops — pick each color and drag its position. Add up to six stops, or hit Randomize for inspiration.
- Copy the CSS and paste it into your stylesheet.
Example
background: linear-gradient(135deg, #5b2b82 0%, #ff5e4d 100%);
Tips for good gradients
- Colors that sit close together on the color wheel blend smoothly; opposite colors can turn muddy in the middle.
- Add a third stop to control the midpoint color.
- Keep text readable — check contrast against the darkest and lightest parts of the gradient.
- Gradients are rendered by the browser, so they weigh nothing compared to an image.
Frequently asked questions
How do I use the generated CSS?
Copy the line and paste it into any CSS rule, for example .hero { background: linear-gradient(135deg, #5b2b82 0%, #ff5e4d 100%); }.
What's the difference between linear, radial and conic gradients?
Linear gradients blend along a straight line at an angle. Radial gradients spread outward from the center. Conic gradients rotate around the center, like a color wheel.
Are CSS gradients supported in all browsers?
Yes. Linear, radial and conic gradients work in all modern browsers without prefixes.
Can I share a gradient?
Yes. The gradient is stored in the page URL, so the share button gives you a link that reopens exactly the same gradient.