CSS & Layout

CSS Gradient Generator

Pick a gradient type, drag the angle, tune the colour stops and watch the preview react instantly. Copy production-ready CSS when it looks right — nothing leaves your browser.

Runs in your browser v1.0.0

Gradient

linear

Choose a type, drag the angle, then adjust the colour stops. The preview and CSS update live.

Color stops

2 stops

Presets

Live preview

updates as you drag

CSS output


                    

How it works

The preview and output are standard CSS gradient functions: linear-gradient(), radial-gradient() and conic-gradient(). Stop positions are written as percentages, and the output can be copied as a declaration, a bare value or a ready-to-paste rule. The optional share link encodes the gradient in the URL fragment, which stays in your browser.

Practical uses

Build linear, radial or conic CSS gradients, optionally repeating, with up to eight color stops, and copy the CSS.

Common ways to use it

  • Create a hero or header background gradient.
  • Compare color stops and angles before committing to a design.
  • Produce a gradient as a declaration, a bare value or a full CSS rule.
  • Share a gradient by a URL fragment that encodes its settings.

Three-stop linear gradient at 120deg

Input

Load example (linear, 120deg, stops #f6d365 0%, #fda085 45%, #f093fb 100%); output format ".element { … }"

Output

linear-gradient(120deg, #f6d365 0%, #fda085 45%, #f093fb 100%)

.element {
    background: linear-gradient(120deg, #f6d365 0%, #fda085 45%, #f093fb 100%);
}

Verified with the tool's formatGradient and buildCss functions on its example configuration; the rule format uses the default selector .element.

Options that matter

  • Type — linear, radial or conic; each shows only the controls it uses.
  • Angle / Start angle — 0–360° for the linear direction or the conic start angle.
  • Radial shape and Center — circle or ellipse at one of nine positions.
  • Color stops — 2 to 8 stops, each with a color picker and a 0–100% position.
  • Repeating — prefixes the function name with repeating-.
  • Output format — declaration, bare value, or a full rule with a selector.
  • Copy CSS / Copy share link — copy the output or a URL fragment that encodes it.

Things to keep in mind

  • Positions are clamped to 0–100%, rounded to two decimals and sorted, so the emitted stop order can differ from the order you entered.
  • Stops are emitted as #rrggbb and cannot carry alpha.
  • The stop list is capped at 8, after which Add stop is disabled.
  • The live preview depends on the browser supporting conic-gradient() and the other CSS gradient functions.