About the CSS Gradient Generator
Pick colours, drag the angle and copy ready-to-use CSS. Gradients are lighter than images and look sharp on every screen.
Gradients add depth to buttons, hero sections, cards and backgrounds without the weight of an image file. CSS gradients scale perfectly to any screen, load instantly and can be changed with one line of code. Writing the syntax by hand, especially with several colour stops, is fiddly, so this generator lets you design visually and copy the code.
Choose linear, radial or conic gradients. Set the angle for linear and conic, or circle and ellipse shapes for radial. Add as many colour stops as you like, set each colour and position, and remove stops you do not need. The preview updates as you work, and the generated background CSS is ready to paste.
Colour stops can be positioned anywhere from 0% to 100%, and placing two stops at the same position creates a hard edge instead of a blend. This trick is used for stripes, split backgrounds and progress bars without any images.
How to use the CSS Gradient Generator
- 1Choose linear or radial.
- 2Set the colours, stops and angle.
- 3Copy the CSS.
Key features
- Linear, radial and conic gradients.
- Unlimited colour stops with positions.
- Angle control.
- Circle or ellipse for radial.
- Live preview and copyable CSS.
Practical uses
- Hero section backgrounds.
- Button and card highlights.
- Gradient text with background-clip.
- Placeholder backgrounds for images that are loading.
Example
A linear gradient at 135° from #f97316 at 0% to #ec4899 at 100% produces background: linear-gradient(135deg, #f97316 0%, #ec4899 100%), a warm diagonal blend for a call-to-action section.
Tips and common mistakes
- Subtle gradients between similar colours often look more professional than strong contrasts.
- Add a middle stop to avoid a muddy grey area between complementary colours.
- Make sure text on gradients has enough contrast at both ends.
Limitations
- Animated gradients need extra CSS that is not generated.
- Mesh or freeform gradients are not possible with standard CSS.
Privacy
Everything runs in your browser.
Frequently asked questions
Do gradients work in all browsers?
Yes. linear-gradient and radial-gradient work in every modern browser without prefixes.
Can I add more than two colours?
Yes. Add as many colour stops as you like.
Can I use it as a text colour?
Yes, with background-clip: text; the generated code can be pasted as a background.
What is a conic gradient?
Colours rotate around a centre point like a colour wheel or pie chart, rather than changing along a line.
How do I make a transparent fade?
Use a colour stop with transparency, such as rgba(0,0,0,0), at one end; this is common for overlays on photos.
Can I layer gradients?
Yes. CSS backgrounds accept several gradients separated by commas, layered from top to bottom.