CSS Gradient Generator
Build a linear, radial or conic gradient, see it live and copy the CSS.
How to use the CSS Gradient Generator
- Choose a typePick linear, radial or conic, and set the angle with the slider.
- Set the colorsChange each color and move its position. Add up to six colors, or start from a preset.
- Copy the CSSPress Copy CSS and paste it into your stylesheet.
Example
Teal to amber at 135°: background: linear-gradient(135deg, #0e5e6f 0%, #f5a524 100%);
The code also includes a plain background color first, as a fallback for very old browsers.
Frequently asked questions
What is the difference between linear, radial and conic?
Linear blends colors along a straight line at an angle. Radial spreads them out in a circle from the center. Conic sweeps them around the center like a pie chart.
Do CSS gradients work in all browsers?
Linear and radial gradients work in every modern browser. Conic gradients work in all current versions of Chrome, Edge, Firefox and Safari.
Are gradients better than images?
Usually yes. A CSS gradient has no file to download, stays sharp at any size and is easy to change later.