Blend colours into a background.

A gradient is a light way to give a header, button or banner some depth without an image file. Choose a type, set your colours and where each one sits, and the preview updates as you go.

The CSS you copy includes a solid fallback colour, so the area never shows up blank.

Runs in your browser. Nothing is uploaded.

Colour stops

More design & colour tools · All 54 tools

How to use it

  1. Choose the Type: Linear, Radial or Conic.
  2. Pick a Preset to start from, or edit the default.
  3. Set each of the Colour stops: its colour and its position from 0 to 100%. Add stop allows up to five, and Remove drops one.
  4. Adjust the Angle for linear and conic gradients, or the Shape and Centre for radial ones (conic uses Centre too).
  5. Press Reverse to flip the stops if you like, then Copy CSS.

Good to know

What the CSS means

background-color: #2193b0;
background-image: linear-gradient(90deg, #2193b0 0%, #6dd5ed 100%);

The first line is the fallback: the colour of the first stop, used if gradients are switched off or a very old browser cannot draw them. The second line is the gradient. Each stop is a colour followed by its position along the gradient.

Angles and positions

  • Linear: 0deg runs from bottom to top, 90deg from left to right and 180deg from top to bottom. The angle turns clockwise.
  • Radial: colours spread out from the Centre you choose. circle keeps the rings round; ellipse stretches them to the shape of the box.
  • Conic: colours sweep round the centre like a clock hand, starting at the angle you set (from 0deg is twelve o'clock). Give the last stop the same colour as the first for a seamless wheel.

Stops in practice

Stops are sorted by position in the output, so you can set them in any order. Two stops at the same position make a hard edge instead of a blend: #2c3e50 50%, #fd746c 50% gives a crisp two-tone split. Reverse mirrors every position, so a stop at 30% moves to 70%.

Readability and banding

When text sits on a gradient, its contrast changes across the area. The contrast checker tests one pair at a time, so check your text colour against the lightest and the darkest stop behind it. Long, subtle blends between two close colours can show faint stripes on some screens. That comes from the limited number of shades a display can show, not from a mistake in your CSS, and a slightly larger colour difference usually hides it.

Questions.

Do CSS gradients work in every browser?

Linear and radial gradients have worked in all major browsers for many years, and conic gradients work in every current one. The fallback colour covers anything older.

Is a gradient better than a background image?

For plain colour blends, usually yes. A gradient is a line of text rather than a file, stays sharp at any size and adds nothing to download.

Why can I only add five stops?

It keeps the editor simple. CSS itself allows more, so you can add further stops by hand to the copied code.

Can I put a gradient on text?

Yes. Put the gradient in background-image on the text element, then add background-clip: text and color: transparent. Check it in the browsers you care about and keep the text readable if the effect does not apply.

What do the presets give me?

Six starting points: Sunrise, Ocean, Night gold, Mint, Dusk and Soft grey. Each loads its own colour stops, which you can then change freely.