Skip to content

CSS Gradient Generator

Add two, three, or however many color stops you need, pick an angle or shape, and get valid CSS back with a live preview — including transparency via rgba() stops, not just solid colors.

  • Any number of color stops, not just two
  • Linear and radial gradients
  • Transparency via rgba() stops
  • Live preview as you edit
  • Copy the CSS in one click

Generator

Generated locally, nothing uploaded

Color stops

CSS

How to build a CSS gradient

  1. 01

    Add your color stops

    Add as many stops as the gradient needs — two for a simple fade, more for a multi-color blend.

  2. 02

    Set the angle or shape

    Linear gradients take an angle in degrees; radial gradients take a shape, circle or ellipse.

  3. 03

    Check the preview

    The preview updates live, so a stop that looks wrong is obvious before copying anything.

  4. 04

    Copy the CSS

    Copy the generated linear-gradient() or radial-gradient() value into a background or background-image property.

Why more than two color stops matters#

A gradient is not limited to a simple fade between two colors — any number of stops can be placed at any position along it, each blending smoothly into its neighbors. A three-stop gradient going red → yellow → blue is a genuinely different tool than a two-stop one, useful for sunset effects, brand-color blends, or a smoother transition than a single interpolation can produce. This generator supports adding as many stops as the design calls for, not a fixed two.

Transparency is a property of the color, not the gradient#

A gradient that fades to transparent — common for an overlay on top of an image, or a fade-out effect at the edge of a scrollable list — is built by using rgba() or a color with an alpha channel as one of the stops, not a separate transparency setting on the gradient itself. rgba(0, 0, 0, 0) and rgba(0, 0, 0, 1) as the two stops produces a fade from fully transparent to fully opaque black, which is the standard technique for a photo-overlay gradient.

Linear angle versus radial shape#

A linear gradient's angle follows CSS convention: 0deg points up, 90deg points right, 180deg points down — clockwise from the top, not the mathematical convention of counter-clockwise from the right. A radial gradient instead takes a shape: circle produces a perfectly round gradient regardless of the element's aspect ratio, while ellipse (the CSS default) stretches to match the box it is applied to.

Frequently asked questions

Can I use more than two colors in a gradient?

Yes — add as many color stops as needed, each with its own position along the gradient. There is no limit built into the CSS gradient syntax itself.

How do I make a gradient fade to transparent?

Use an rgba() color with alpha 0 as one of the stops, such as rgba(0,0,0,0) fading to rgba(0,0,0,1). Transparency comes from the color value, not a separate setting on the gradient.

What's the difference between circle and ellipse for a radial gradient?

Circle produces a perfectly round gradient regardless of the element's width and height. Ellipse — the CSS default — stretches to match the aspect ratio of the box it is applied to.

Which direction does 0deg point in a linear gradient?

Up. CSS gradient angles go clockwise from the top: 90deg points right, 180deg points down, 270deg points left — different from the standard mathematical angle convention.

Is this generated on a server?

No. The CSS is assembled entirely in your browser — nothing you enter is uploaded.

Developers

UUID Generator

Generate cryptographically random UUID v4 or time-ordered UUID v7, in bulk.

Developers

Base64 Encoder & Decoder

Encode and decode Base64 with correct UTF-8 handling, including the URL-safe alphabet.

Developers

ULID Generator

Generate ULIDs — sortable by creation time like UUID v7, but Crockford Base32 instead of hex.