Skip to content

Animated Gradient Generator

Build a moving gradient background with the keyframes included.

The animation

CSS
The CSS appears here

Quick Tool Overview

The Animated Gradient Generator produces the technique that actually works — an oversized gradient with an animated position — plus the @property conic rotation and a crossfade, each with a prefers-reduced-motion block emitted as standard.

What it does
Builds animated gradient backgrounds
You give it
Colours, speed and direction
You get back
Gradient, keyframes and animation CSS
Best for
Hero sections and ambient backgrounds
Color Tools Free, unlimited use No sign-up Runs in your browser

About the Animated Gradient Generator

CSS cannot interpolate between two gradients, which is why animating the colour stops directly does nothing. The technique that works is to make the gradient much larger than the element and animate its position, so a different part of it is visible at each moment and the whole thing appears to drift.

This generates that: the gradient, the background-size, the keyframes and the animation shorthand, with speed and direction as sliders and the result running live in the preview. Two other approaches are included — a rotating conic gradient driven by an @property angle, which is the modern way to do a sweeping border, and an opacity crossfade between two stacked gradients for the slow ambient kind.

A prefers-reduced-motion block is emitted with every result, not as an option. A continuously moving background is exactly the kind of thing that triggers discomfort for people with vestibular disorders, and the fallback costs three lines.

Key features of the Animated Gradient Generator

The technique that works

CSS cannot interpolate two gradients, so the position is animated on an oversized one instead.

Three approaches

Position drift, a rotating conic sweep driven by an @property angle, and an opacity crossfade for slow ambient movement.

Reduced motion by default

Emitted with every result rather than offered as an option, because a moving background can cause real discomfort.

Live preview

The animation runs in the page, so speed can be judged rather than guessed.

Performance notes

Which technique paints every frame and which one does not, so a full-screen background stays smooth.

How to use the Animated Gradient Generator

  1. 1

    Choose your colours

    Two or more stops. Three or four gives the most movement.

  2. 2

    Set speed and direction

    How long one cycle takes and which way it drifts.

  3. 3

    Pick the technique

    Position drift, a rotating conic sweep, or a crossfade between two gradients.

  4. 4

    Copy the CSS

    Keyframes, animation and the reduced-motion block included.

Frequently asked questions

Because gradients are images and CSS cannot interpolate between two of them. Animate background-position on an oversized gradient instead, which is what this generates.

Reviews of the Animated Gradient Generator

What people who use the Animated Gradient Generator think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Animated Gradient Generator. It takes half a minute and no account.

Write the first review

More color tools