CSS Gradient Generator

Build linear and radial gradients and copy the CSS.

Build linear and radial CSS gradients with a live preview and copy the finished background declaration. You can set the angle or shape, and use between 2 and 8 color stops, each with a position percentage. It suits developers and designers who want valid gradient syntax without writing it by hand.

What is a CSS gradient?

A CSS gradient is an image generated by the browser that smoothly blends between two or more colors, used wherever an image is allowed, most often in the background property. A linear-gradient runs along a line at a given angle: 90deg goes left to right, 180deg goes top to bottom. A radial-gradient radiates outward from a center as a circle or an ellipse. Each color stop has a color and a position along the gradient line, written as a percentage. The browser interpolates colors between neighboring stops, and stops are ordered by position. Gradients scale to any size, cost no extra network request and can be layered.

How to use CSS Gradient Generator

  1. Choose a type Select Linear or Radial in the Type list.
  2. Set the angle or shape For Linear drag the Angle slider; for Radial choose Circle or Ellipse under Shape.
  3. Edit the stops Change each Stop color and Position (%), use Add stop for more colors or Remove to delete one.
  4. Copy the CSS Copy the background declaration from the CSS output box.

Frequently asked questions

How many color stops can I use?

Between 2 and 8. Add stop is disabled at 8 stops and Remove is disabled when only 2 remain, because a gradient needs at least two colors.

Can I set the radial center or size?

No. Radial gradients only offer the Circle and Ellipse shapes, with the default center and size from CSS. You can edit the copied CSS by hand to add position keywords.

What do positions mean?

Position (%) is where along the gradient line a color is fully reached, from 0 to 100. Values outside that range are clamped. The output lists stops sorted by position.

Does it support transparency?

The color picker is for opaque HEX values, but the text field accepts what you type, so you can enter an 8-digit HEX. The preview shows it only if the browser understands the value.

Does it output vendor prefixes?

No. It outputs the standard unprefixed syntax, which every current browser supports.