Effects

Hue Rotate Animation

Cycles continuously through the colour wheel.

Edit this in the studio

Opens with this animation loaded. Nothing is uploaded — the scene travels in the link.

animation.css
.hue-cycle {
  transform: translate3d(180px, 100px, 0);
  width: 120px;
  height: 120px;
  background: #6366f1;
  border-radius: 20px;
  animation: hue-cycle-anim 3000ms linear 0ms infinite both;
  will-change: transform, opacity;
}

@keyframes hue-cycle-anim {
  0% {
    filter: none;
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hue-cycle {
    animation: none;
    transition: none;
  }
}

Why it is built this way

hue-rotate shifts every colour in the element at once, including text and borders, which is why it works on a whole component rather than needing per-property colour keyframes.

What it animates

1 property across 1 CSS declaration. The bar shows when each one is moving.

Hue Rotate
filter
0 360
2 stopscompositor

What it costs to run

Filter is handled by the compositor: no layout, no repaint, and the work can run off the main thread. This is the cheap end of CSS animation, which is why it stays smooth on a slow phone where other properties will not.

It runs for 3.00s across 2 keyframe stops, with every property moving over the same window.

A single linear curve on a plain box. Linear looks wrong on almost anything that starts and stops — but it is exactly right here, because a continuous loop that eases would visibly stutter at the seam where it repeats.

Accessibility

Nothing here hides content — filter moves over 3.00s and the element is visible throughout. The exported prefers-reduced-motion guard still silences it, which matters most for the looping ones: motion that never stops is the kind that makes people feel unwell.

Related animations

huecolourfilterloop