CSS Gradient Generator
Design a gradient visually and copy the CSS. Choose linear, radial or conic, add up to six colors, move the stops and see the result live.
How to use the css gradient generator
- Pick the gradient type and the angle or position.
- Change the colors and stops, add more colors, or start from a preset or the random button.
- Click Copy CSS and paste it into your stylesheet.
The output has two lines: a plain background color first, which older browsers use as a fallback, and the gradient after it. Use the background property on any element. A linear gradient blends along a straight line at the angle you choose (90 degrees goes left to right, 180 top to bottom). A radial gradient spreads from a point outward. A conic gradient sweeps around a centre point like a color wheel or a pie chart.
Frequently asked questions
Do gradients work in all browsers?
Linear, radial and conic gradients all work in every current browser.
How do I make a hard color stripe?
Give two stops the same position, for example one color ending at 50% and the next starting at 50%.
Can I use a gradient on text?
Yes, with background-clip: text and a transparent text color.
