CSS Gradient Generator

Build a CSS linear-gradient visually — set the angle and two or three color stops, watch the preview update live, then copy the exact background: linear-gradient(...) CSS or the matching Tailwind gradient utility classes (bg-gradient-to-r, from-*, to-*).

How to use the CSS Gradient Generator

  1. Set the gradient angle. Drag the angle slider to control the direction the gradient flows, from 0° to 360°.
  2. Pick your start and end colors. Choose the two endpoint colors for the gradient with the color pickers.
  3. Optionally add a middle color stop. Enable a third, middle color stop for a smoother three-color transition.
  4. Copy the CSS or Tailwind classes. Copy the generated linear-gradient CSS, or switch to the equivalent Tailwind gradient utility classes.

Frequently asked questions

How do I create a linear gradient in CSS?

Use background: linear-gradient(angle, color1, color2). This generator builds that value for you from an angle slider and color pickers, with a live preview.

What CSS property creates a gradient background?

background (or background-image) with a linear-gradient() function value. The angle argument controls direction; each color argument is a stop.

How do I add a third, middle color stop?

Enable the middle-color option to add a third stop between your start and end colors for a smoother, richer transition.

Can I export the gradient as Tailwind classes?

Yes. Toggle Tailwind mode to get the equivalent bg-gradient-to-{direction} plus from-*/via-*/to-* utility classes.

How do I control the gradient angle?

The angle slider sets the direction in degrees, matching the first argument of the CSS linear-gradient() function (0deg = bottom to top, 90deg = left to right).

Is this CSS gradient generator free?

Yes — completely free with no sign-up, and it runs entirely in your browser.

Does it support a dark mode preview?

Yes, toggle the light/dark preview to check contrast and legibility of text over the gradient in both themes.

Can I copy the raw CSS instead of Tailwind?

Yes, raw CSS is the default output — Tailwind classes are an optional toggle for projects already using Tailwind.