CSS Gradient Generator
Pick a gradient type, then edit the color stops. Each stop has a color, a transparency and a position. The preview updates as you work, and the code shows the complete background declaration.
CSS Gradient Generator runs entirely in your browser: the text you paste is never sent to a server. It is free and needs no sign-up.
How to use it
- Choose a type and colors Pick linear, radial or conic. Linear and conic have an angle slider. Radial has a shape menu, and radial and conic have a position menu. Each color stop takes a HEX code, a position and an opacity. Use 2 to 8 stops.
- Add, remove and order stops Add a stop to fill the largest gap; it copies the color of the stop before it. You cannot remove a stop when only 2 are left. Stops are sorted by position in the output, so list order does not matter.
- Copy the CSS declaration Press Copy CSS to copy the background line, such as background: linear-gradient(...). Tick Repeat the pattern to repeat the gradient, and switch the preview background to check transparent stops.
Questions
Why does a transparent stop look different on each background?
A color with opacity lets the background show through, so the same gradient looks different on light and dark surfaces. Browsers blend colors between stops in the sRGB color space. Use the checkered background to see the real transparency of the fade.
What do radial and conic gradients change?
A radial gradient draws rings from one point, and you can pick a circle or ellipse shape and a position such as top left. A conic gradient sweeps the colors around a point, starting at the angle you set, from 0 to 360 degrees.