07.01 · Ambient & Background
Animated Gradient Background
Colors slowly drift across a soft gradient background. Best for hero sections.
Watch it
It moves by itself. Pause it to look closely, or turn on slow motion to see each part of the movement.
Inside, the gradient is painted four times as wide and tall as the box, and the box shows only the outlined part as it slides across and back.
Too fast runs a whole cycle in a few seconds, which pulls the eye from the content. Calm, as you set it, takes several times as long, so it stays in the background.
Try it
Change a setting and see the difference as it moves.
Gradient
Sliding is the calmest; the color wheel turns every color.
Speed
Longer cycles feel calmer.
Colors
The set of colors the gradient moves through.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add an animated gradient background to [the section you want behind your content]. Paint a soft gradient much larger than the section and slowly slide it back and forth, or turn all its colors around the color wheel, so the colors keep shifting behind the content. End the gradient on the color it starts with, so the loop never shows a seam. A long, slow cycle feels calm; a fast one pulls attention away from the content. If the visitor has reduced motion turned on, show the gradient still. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.