toolo.dev

CSS Gradient Generator

Make a CSS gradient with a live preview: linear, radial or conic, up to 10 color stops, transparency and presets. Copy the background CSS or a Tailwind class.

Type a hex color, an 8-digit hex with transparency (#ff000080), or rgba(255, 0, 0, 0.5).

%
%
background: linear-gradient(90deg, #FF0000 0%, #0000FF 100%);
bg-[linear-gradient(90deg,#FF0000_0%,#0000FF_100%)]

About the CSS Gradient Generator

Pick your colors, set the angle or center, and the CSS gradient generator writes the linear-gradient(), radial-gradient() or conic-gradient() code while you watch the preview change. Copy it as a plain CSS background line or as a Tailwind CSS class; the checkerboard behind the preview shows exactly which parts are see-through.

A CSS gradient is an image the browser draws from a few numbers. It stays sharp on any screen and costs no extra download, which makes it a good fit for hero sections, buttons, overlays that keep text readable on a photo, and simple patterns like stripes or pie charts.

  1. Choose a Gradient Type (Linear, Radial or Conic), or start from one of the 10 Presets. Random picks two or three bright colors at a new angle.
  2. Set the direction. Linear has an Angle slider (Reset returns it to 90°). Conic has a Start angle and a Center. Radial has a Shape (Circle or Ellipse) and a Center with 9 choices, from Top left to Bottom right.
  3. Edit the Color Stops. Each row has a color picker, a text field and a Position slider with a percent box. The text field takes 3, 4, 6 or 8-digit hex and rgb() or rgba(), such as rgb(255 0 0 / 50%); named colors and hsl() turn it red and aren't applied.
  4. Add Color adds a stop, up to 10, and the X removes one (the last two always stay). Row order doesn't matter: stops are sorted by position in the code.
  5. Turn on Repeating for stripes or rings, with stops close together such as 0% to 10%. Toggle Size makes the preview taller or shorter.
  6. Copy the result from CSS Code or Tailwind CSS class.