How to use CSS gradient generator
- 1
Start from a preset or press Random, then choose linear, radial or conic.
- 2
Adjust the angle or centre, and set each colour stop's colour and position. Add up to 8 stops.
- 3
Copy the CSS declaration, or the Tailwind class, and paste it into your stylesheet.
What this tool does
The CSS gradient generator lets you design gradient backgrounds by eye instead of by trial and error in code. Pick the type and colours, watch the large preview update, then copy a single CSS line for buttons, page headers, cards or hero sections.
Features
- Three types: linear (with angle), radial (circle or ellipse, with a movable centre) and conic (with start angle and centre).
- Up to 8 colour stops, each with a colour picker, a text box for any colour format and a position slider.
- Repeating gradients for stripes and patterns.
- Presets and a random button to get started quickly.
- Output as a standard CSS declaration and as a Tailwind arbitrary-value class.
Limits
- Stops are positioned in percentages. For fixed pixel positions, edit the copied CSS.
- Mesh gradients and noise textures can't be made with CSS gradients alone.
Where your design is processed
This tool works in your browser: the preview and code are made on your own device, so nothing is sent to our server for this tool. Some other tools on UtiloNest do use our server, and their pages say so.
Frequently asked questions
What is the difference between linear, radial and conic gradients?
A linear gradient changes colour along a straight line at the angle you choose. A radial gradient spreads out from a centre point as a circle or ellipse. A conic gradient sweeps around a centre point like the hands of a clock, which is useful for colour wheels, pie-chart effects and spotlights.
How do colour stops work?
Each stop is a colour at a position from 0% to 100% along the gradient. The browser blends smoothly between neighbouring stops. Two stops at the same position make a hard edge instead of a blend, which is how stripes are made.
Can I use transparent colours?
Yes. Type a colour with transparency in a stop's text box, such as #845ec280 or rgb(132 94 194 / 50%). The CSS output keeps the transparency, so the gradient can fade into whatever is behind it.
Does the CSS work in every browser?
Linear and radial gradients work in every current browser. Conic gradients work in all current versions of Chrome, Edge, Firefox and Safari. No vendor prefixes are needed today.
Is my design uploaded?
No. The preview and the CSS are made in your browser, and nothing is sent to our server.