About This Tool
NinjaFunction's CSS Gradient Generator lets you design linear, radial and conic gradients with multiple color stops and a live preview. Copy the ready-to-use CSS declaration, download the gradient as a PNG, or start from a preset. Everything runs locally — nothing is uploaded.
About CSS Gradients
CSS gradients let you create smooth transitions between two or more colors without any image files. They scale perfectly to any size, are GPU-accelerated, and are supported in every modern browser.
Linear Gradients
A linear gradient transitions colors along a straight line. You control the direction with an angle in degrees (0° = bottom to top, 90° = left to right).
Radial Gradients
A radial gradient transitions colors outward from a center point. You can control the shape (circle or ellipse) and size. Great for spotlight and glow effects.
Conic Gradients
A conic gradient sweeps colors around a center point like a pie chart. Useful for color wheels, progress indicators, and radial patterns.
Linear, Radial and Conic Gradients
| Type | How it looks | Good for |
|---|
| Linear | Colours blend along a straight line | Backgrounds, buttons and banners |
| Radial | Colours spread out from a centre point | Spotlights, glows and soft shadows |
| Conic | Colours sweep around a centre like a clock | Pie charts and colour wheels |
Tips for Gradients That Look Good
- Use two or three colours that sit near each other on the colour wheel.
- Add a slight angle, such as 135 degrees, for a more natural look than straight up and down.
- Keep text readable. Check the contrast over the lightest and darkest parts of the gradient.
- Use a darker or lighter shade of the same colour for a subtle effect.
Using the CSS
Copy the declaration and paste it as the background of any element, such as a section, a button or the body. Add a plain background colour just before it as a fallback for the rare browser that does not support gradients. Modern browsers all support linear and radial gradients, and conic gradients work in current versions of Chrome, Edge, Firefox and Safari.
FAQ
Are CSS gradients supported in all browsers?
Linear and radial gradients are universally supported. Conic gradients are supported in all modern browsers (Chrome 69+, Safari 12.1+, Firefox 83+).
Can I use the generated CSS commercially?
Yes — the generated CSS is yours. Gradients are simple CSS declarations, not copyrighted assets.
Is anything sent to a server?
No. Everything runs locally in your browser. Your colors, angle, and stops never leave your device.
What is the difference between linear, radial and conic gradients?
A linear gradient blends colours along a straight line at the angle you choose, such as 90deg for left to right. A radial gradient spreads out from a centre point in a circle or ellipse. A conic gradient sweeps the colours around a centre point like the hands of a clock, which is useful for pie-chart and colour-wheel effects.
How many colour stops can I use?
A gradient needs at least two stops, so the remove button is turned off when only two are left. You can add more stops to build multi-colour gradients, and move each one to set where its colour sits along the gradient.
Why does my gradient look striped or banded?
Banding shows up when two similar colours are stretched across a large area, especially dark blues and greys. Add a middle stop, choose colours that are a little further apart, or keep the gradient to a smaller element.