DO IT EASY APP
English

CSS gradient generator

Design a color gradient visually and copy the CSS. Linear, radial and conic, with as many color stops as you like.

  • No sign-up, no fees.
  • CSS gradient generator: tune color transitions by eye.
  • Linear, radial and conic gradients.
  • Up to 8 color stops, with adjustable positions.
  • Repeating striped patterns.
  • Copy the CSS code with one click.

How to use the CSS Gradient Generator

No more finding the degrees inside linear-gradient(...) by trial and error. Five steps:

  1. Pick the gradient type. Linear, Radial or Conic.
  2. Set the direction. For linear and conic gradients, move the Angle slider; for radial, pick Circle or Ellipse under Shape.
  3. Pick the colors. Under Color stops, change the Color and Position value of each stop. Add color puts a new stop in the middle of the widest gap; there can be up to 8 stops.
  4. Pattern (optional). With Repeat (striped pattern) on, the gradient repeats from the start; with stops close together you get striped patterns.
  5. Copy. Take the code below with Copy and paste it into your CSS file. To begin again, Start over.

What is a CSS gradient (color transition)?

A CSS gradient is the CSS feature that makes two or more colors blend softly into each other in an element's background. Without using an image file, it gives buttons, cards, heading areas and page backgrounds a modern look. Since there's no image, the page opens fast and stays sharp at every screen size. Writing gradient code means dealing with numbers; this tool makes it visual.

Three types of gradient

  • Linear: colors flow along a line. 0° is bottom to top, 90° left to right, 180° top to bottom.
  • Radial: colors spread from the center outward. Good for spotlights and soft glows.
  • Conic: colors rotate around the center, like a clock face. Pie charts and color wheels are made with it.

Browser support

All browsers in use today support linear and radial gradients; no prefix (-webkit-) is needed. Conic gradients work in all current browsers too.

Tips for a nice color transition

Two colors close together on the color wheel (like orange and pink) almost always look nice. Opposite colors (blue and orange) can make a muddy, grayish tone in the middle; you can prevent this by adding a third color between them. If you'll put text over the gradient, make sure the text is readable at every point.

Common mistakes

  • Too many colors: more than three bright colors tire the eye; two or three colors are enough for most designs.
  • Forgetting contrast: white text on a light-colored gradient can't be read.

For matching colors there's Random color palette generator and Color converter, for shadows CSS box-shadow generator, and to take colors from a photo Image color picker / palette.

Frequently asked questions

Is the CSS gradient generator free?

No cost at all. The colors and the degrees, too. Not bad, right?

Is anything I do saved?

The code is made in your browser. What you type is processed, but never shared with anyone.

Where should I paste the code?

Into the CSS rule of the element you want to apply the gradient to: for example .card { background: linear-gradient(...); }.

Can I use a transparent color?

The color picker doesn't give transparency; after copying the code you can change a color to rgba(...) or transparent.

Can a gradient be applied to text?

Yes, but extra CSS is needed: with background-clip: text and color: transparent you can give the text a gradient fill.

How does the linear gradient angle work?

0° flows bottom to top, 90° left to right, 180° top to bottom, 270° right to left.

Is a gradient faster than an image?

Usually yes. No file is downloaded; the browser draws the gradient itself.

Can I use it on my phone?

Yes. Adjust the sliders with your finger and take the code with Copy.

Where does a gradient background look good?

At the top of landing pages, on buttons, in card header areas, in social media images and in presentation backgrounds. Using it in a few important places rather than everywhere makes the design look more balanced.

What does a color stop's position mean?

The percentage of the gradient at which the color appears fully. As two stops get closer, the transition gets harder; if they're at the same position, a sharp line forms.

What is the conic gradient for?

It makes colors rotate around a center. Color wheels, pie chart looks and circular loading indicators are easily made with this type.

How many color stops can I add?

Up to 8. For most nice gradients, 2-3 stops are enough.

Related tools