CSS gradient generator
Design linear, radial and conic CSS gradients with as many colour stops as you like, and copy the code.
Runs entirely in your browser. Your files never leave your device.
About this tool
Gradients give buttons, hero sections and backgrounds depth without a single image file. Pick a preset or start from your own colours, then choose the shape: a linear blend at any angle, a radial glow from the centre, or a conic sweep around a point, perfect for pie charts and colour wheels.
Add up to ten colour stops and slide each one to its position, tick “repeating” for stripes and rings, and watch the large preview update live. The generated background declaration is ready to paste into a stylesheet, and the share button keeps the gradient in a link. Every modern browser supports these gradients without prefixes.
How it works
- Pick a preset or keep the default colours.
- Choose linear, radial or conic, and the angle or shape.
- Adjust, add or remove colour stops.
- Copy the CSS.
Stops are sorted by position. Two stops at the same position give a hard edge instead of a blend, the usual trick for stripes.
Worked example
A sunset button: linear, 135°, from #FF7E5F to #FEB47B gives background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);, ready to paste.
For warning stripes, tick repeating and place black and yellow stops at 0, 10, 10 and 20 px: identical positions for two stops create a hard edge, so repeating-linear-gradient(45deg, #000 0 10px, #ff0 10px 20px) draws crisp bands.
Good to know
- Gradients between two saturated opposite colours can turn grey in the middle; add a stop in between.
- Set a plain background colour first as a fallback, for printing and very old browsers.
- Keep text contrast in mind: check it against the lightest and darkest parts of the gradient.