Skip to content

CSS Gradient Generator

Build linear, radial and conic gradients with unlimited color stops.

Updated · Examples checked by automated tests

LOCAL WORKSPACENO UPLOAD REQUIRED

Colour stops

#6366f10%
#a855f7100%
CSS
background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);

About CSS Gradient Generator

CSS gradients render as images without a single network request, scale to any size without artefacts and animate smoothly - which is why they replaced background images for most decorative work.

This generator supports linear, radial and conic gradients with unlimited draggable colour stops, angle control, and live CSS output you can paste straight into a stylesheet.

How CSS Gradient Generator works in your browser

The generator assembles a linear-gradient, radial-gradient or conic-gradient value from your colour stops, their positions and the angle or shape you choose, and renders it on a live preview. The CSS it outputs is exactly what the preview uses.

Gradients blend in sRGB, which can pass through dull greys between complementary colours. Adding an intermediate stop in a more saturated hue is the usual fix.

When to use it

  • Building a hero background without shipping an image file.
  • Creating a colour wheel or progress ring with a conic gradient.
  • Fixing a muddy midpoint by adding and positioning an extra stop.

Worked examples

A diagonal two-colour background

Settings: Linear, 135°, stops #6366f1 at 0% and #ec4899 at 100%

Input

(two stops)

Expected output

background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);

135° runs from the top-left corner to the bottom-right. Positions are percentages along that line.

A radial glow

Settings: Radial circle, same stops

Input

(two stops)

Expected output

background: radial-gradient(circle at center, #6366f1 0%, #ec4899 100%);

A radial gradient starts at the centre and spreads outward; circle keeps it round on rectangular elements.

Limits and checks before you use the result

  • Gradients between very different hues can look muddy in the middle because they blend in sRGB.
  • Gradients are images in CSS, so use background or background-image, not background-color.
  • Conic gradients need browsers from 2021 onward.

Frequently asked questions

Why does my gradient look muddy in the middle?

Blending through sRGB can pass near grey. Adding an intermediate stop in a more saturated hue fixes it.

Can I use more than two colors?

Yes, add as many stops as you like and drag each one to position it along the gradient line.

What is a conic gradient for?

It sweeps colour around a centre point, which makes it the natural choice for pie charts, colour wheels and progress rings.

Related tools