This CSS gradient generator lets you design a gradient background visually and copy the finished CSS. You can build linear, radial and conic gradients with up to 6 colours. It is free, and it suits web designers, developers and anyone who wants a good-looking background without writing the code by hand.
How to use the CSS gradient generator
The tool follows three simple steps. You will have working code in under a minute.
- Choose the type and angle. Pick linear, radial or conic. Then set the angle to change the direction of the blend.
- Pick your colours. You can use up to 6. Start with two, then add more only if the design needs them.
- Copy the CSS. Paste it into your stylesheet, usually as a background on a section, button or card.

Related jobs are one click away: try the CSS Box Shadow Generator, the Color Converter or the What Is My IP.
Not sure where to start? Use the random option to get a new combination. It is a quick way to find a palette you would not have chosen yourself, and you can adjust it afterwards.
Which gradient type should you pick?
Each type of CSS gradient behaves differently. This table shows the main difference.
| Type | How it looks | Good for |
|---|---|---|
| Linear | Colours blend along a straight line, set by the angle | Page backgrounds, hero sections, buttons |
| Radial | Colours spread out from a centre point | Spotlights, soft glows, rounded highlights |
| Conic | Colours sweep around a centre point, like a clock face | Colour wheels, pie-style graphics, shiny effects |
If you only need one style, a linear gradient is the safest choice. It is the most common and works almost anywhere.

What are CSS gradients useful for?
A gradient is a background image made by the browser, so you do not need to export or upload a picture. That keeps things simple. Here are some real uses:
- Hero banners. A two-colour diagonal blend behind a headline looks polished and loads without an image file.
- Buttons and cards. A subtle shift between two close shades adds depth without feeling heavy.
- Overlays. A dark gradient over a photo can make white text easier to read.
- Decorative shapes. A radial gradient can act as a soft glow behind a product or icon.
- Charts and badges. A conic gradient is a quick way to draw a simple colour wheel or ring.
Tips for gradients that look good
- Keep colours close on the wheel. Neighbouring hues, such as blue and purple, blend smoothly. Opposites like red and green can turn muddy in the middle.
- Use fewer colours. Two or three usually look cleaner than six. Add more only when you want a rainbow or a multi-tone effect.
- Change the angle in small steps. Moving from 90 degrees to 135 degrees gives a diagonal feel. Small changes often look better than big ones.
- Check text contrast. Put your real heading on the gradient and make sure it is readable at both the light and dark ends.
- Match your brand. Start from your main brand colour and pair it with a lighter or darker shade of the same hue.
Common problems and how to fix them
The gradient looks harsh or stripy
This often happens when two very different colours sit side by side. Try a closer pair, or add a middle colour that bridges the two.
The text is hard to read
Light text on a pale part of the gradient is the usual cause. Darken that end, or place a solid panel behind the text.
The code does not seem to work
Gradients belong in a background property, not in a colour property. Paste the copied code into a rule such as background on an element that has a visible size. An empty element with no height shows nothing.
You want a fallback
Add a plain background colour on the line before the gradient. If a browser ignores the gradient, it still shows a solid colour.
Do you need to install anything?
No. The page works in your browser, and nothing you create is uploaded. You can try as many combinations as you like, then copy the one you want.
