CSS gradient generator
Design linear, radial and conic gradients with several colour stops, preview them live and copy the CSS in one click.
- Files stay on your device
- Free, no sign-up
- No installation
- Instant results
How to use it
- Pick a gradient type and drag the angle slider or choose a shape and position.
- Edit the colours and positions of each stop, or add more stops (up to 6). Try a preset or press Random.
- Copy the CSS and paste it into your stylesheet.
CSS gradients draw smooth colour transitions with no image file, so they load instantly and scale to any size. A linear gradient blends colours along a straight line at the angle you choose; a radial gradient spreads outward from a point; and a conic gradient sweeps around a centre like the face of a clock, which is handy for pie charts and colour wheels.
Each colour stop has a colour and a position from 0% to 100%. Placing two stops at the same position creates a hard edge instead of a blend. The generated code uses the standard background property with linear-gradient(), radial-gradient() or conic-gradient(), which all modern browsers support without vendor prefixes. A solid fallback colour (the first stop) is included for very old browsers.
For readable text over a gradient, check the contrast against the lightest and darkest colours it passes through. Everything here runs in your browser and nothing is stored.
A closer look
A gradient adds depth without any image download, so it costs no extra loading time. Keep contrast in mind: text over a gradient must stay readable across its lightest and darkest parts.
Developers often paste sample data into online tools, so a tool that runs locally in the browser, without sending the content to a server, is the safer habit for tokens, keys and customer records.
Frequently asked questions
Do I need vendor prefixes like -webkit-?
No. Linear and radial gradients are supported unprefixed in all current browsers, and conic gradients are supported in all modern ones.
How do I make a hard colour edge?
Give two neighbouring stops the same position, for example red at 50% and blue at 50%.
Can I use the gradient as a text colour?
Yes: apply it as the background, then use background-clip: text and a transparent text colour.
How many colour stops can I add?
Up to six in this tool, though CSS itself allows many more.
More free tools
A practical example
When preparing visuals for a presentation, inspect both the full-size result and a thumbnail. Fine lines or small labels may disappear at the size your audience actually sees.