CSS Gradient Generator
Build a linear, radial or conic gradient, see it change as you move the sliders and copy the CSS.
- Nothing is uploaded or stored
- No sign-up
Colours and positions
How to make a CSS gradient
Choose linear, radial or conic.
Set the angle. Radial gradients do not use one.
Pick two to five colours and move each one to where it should sit.
Copy the CSS and paste it into the rule for your element.
The code has two lines on purpose. The first sets a plain colour. If a browser cannot draw the gradient, it keeps the plain colour instead of showing nothing.
Linear, radial and conic gradients
| Type | How it blends | Often used for |
|---|---|---|
| Linear | Along a straight line at the angle you choose | Page heroes, buttons, section backgrounds |
| Radial | Outward from a point | Soft glows and spotlights |
| Conic | Around a point, like a clock hand | Colour wheels and simple pie shapes |
In CSS, 0deg points up and 90deg points right, so 135deg runs from the top left to the bottom right.
Tips for gradients that look good
- Choose colours close to each other on the colour wheel. Opposite colours often turn grey in the middle.
- If the middle looks dull, add a third, brighter colour at about 50%.
- Check that text is readable over the lightest and the darkest part. A contrast checker such as WebAIM’s tests one colour at a time.
- Keep strong gradients for one or two places on a page.
Read how to choose a website colour palette for help choosing colours, or go back to our CSS guide.
CSS Gradient Generator questions, answered
Short, honest answers to the questions people ask most about this topic.
Do CSS gradients slow down a website?
No more than most styles. A gradient is drawn by the browser, so there is no image to download.
Which browsers support CSS gradients?
All current browsers support linear, radial and conic gradients. The plain colour in the first line is there for anything older.
Can I put a gradient on text?
Yes. Set the gradient as the background, then use background-clip: text with a transparent text colour. Keep a readable plain colour as a backup.
Can I use the generated code in a client project?
Yes. The code is plain CSS, and you can use it anywhere.
More free tools
Find tools for images, text, code, search and speed, or plan your budget with the cost calculator.