How to use the gradient generator
- Pick a type: linear (a straight band of color), radial (from the center outwards) or conic (around the center, like a color wheel).
- Set the angle for linear and conic gradients. 0° points up, 90° points right.
- Change the color and position of each stop. Add stops for richer blends; you need at least two.
- Copy the CSS and paste it into your stylesheet.
Short of ideas? Click one of the Presets or press Random, then fine-tune it. ⇄ Reverse flips the order of the colors.
Browser support
Linear and radial gradients work in every modern browser. Conic gradients work in all current versions of Chrome, Edge, Firefox and Safari. The generated code also includes a plain background color first, so very old browsers still show something sensible.
Tips for good-looking gradients
- Colors that sit close together on the color wheel blend smoothly. Opposite colors (like blue and orange) can turn grey in the middle; add a stop in between to keep it vivid.
- For text on a gradient, check the readability of both ends with the contrast checker.
- Subtle gradients (two similar shades) often look more professional than bright rainbows for backgrounds.
Where gradients work well
- Hero sections: a large, soft gradient behind a headline adds depth without a photo.
- Buttons: a slight top-to-bottom gradient gives a gentle, raised look.
- Image overlays: a gradient from transparent to dark at the bottom of a photo makes white text on it readable.
- Charts and progress bars: a conic gradient can draw a simple pie or ring chart in pure CSS.
FAQ
Can I use a gradient as a text color?
Yes: use the gradient as background, then add background-clip: text; and color: transparent; on the text element.
How do I make a hard edge instead of a blend?
Give two neighbouring stops the same position, for example red at 50% and blue at 50%.
Why do I see stripes in my gradient?
This is called banding. It appears when two very similar colors are stretched over a large area. Use slightly more different colors, or add a stop in the middle, to make the steps less visible.