CSS Gradient Generator

Build linear and radial CSS gradients from up to five colours, preview them, and copy ready to use CSS for backgrounds and buttons.

Runs on your device

Result

Results appear here as you type.

What it does

Choose colours and an angle. The preview image is drawn from the same values, and the CSS works in every modern browser without prefixes.

How to use it

  1. Pick two to five colours.
  2. Choose linear or radial and the angle.
  3. Copy the CSS.

Example

The example fills in realistic values and runs the tool. Select Try an example above to see it.

When it helps

  • Hero backgrounds.
  • Buttons and badges.
  • Social media graphics.

Questions

Do I need -webkit- prefixes?

No. Unprefixed gradients are supported by all current browsers.

How are stops spaced?

Evenly from 0% to 100%. Edit the percentages in the CSS for custom spacing.

More developer tools

See all 25

People also use

Browse all 200 tools