Rainbow Letters

Entrance & Kinetic · Animated · pure CSS

Each glyph takes a hue stepped by its index while the whole word cycles through the spectrum via hue-rotate. A flowing rainbow (per-letter markup).

R a i n b o w   L e t t e r s

How it works

Rainbow Letters is an animated entrance & kinetic text effect rendered entirely in CSS. Each character is wrapped in its own span so it can animate independently — the HTML and JSX exports include that per-letter markup.

Controls

Rainbow Letters exposes 2 dedicated controls — Hue Spread and Speed — on top of the shared type controls (font, weight, letter-spacing and case). Open it in the generator to tune every value live, then copy the updated CSS.

CSS

/* Rainbow Letters — generated with TEXT-FX
 * HTML: each character is wrapped in a <span> — see the HTML export.
 * Font: 'Bungee', cursive (load from Google Fonts).
 */

.text-effect {
  font-family: 'Bungee', cursive;
  font-weight: 900;
  letter-spacing: 0px;
  text-transform: none;
}

.text-effect {
  white-space: pre;
  animation: text-effect-spectrum 4.7s linear infinite;
}
.text-effect .fx-ch {
  display: inline-block;
  color: hsl(calc(var(--i) * 59deg) 90% 66%);
}

@keyframes text-effect-spectrum {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

HTML

This effect needs the markup below (per-letter spans, SVG defs, or a data-text attribute).

<style>
.text-effect {
  font-family: 'Bungee', cursive;
  font-weight: 900;
  letter-spacing: 0px;
  text-transform: none;
}

.text-effect {
  white-space: pre;
  animation: text-effect-spectrum 4.7s linear infinite;
}
.text-effect .fx-ch {
  display: inline-block;
  color: hsl(calc(var(--i) * 59deg) 90% 66%);
}

@keyframes text-effect-spectrum {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}
</style>

<div class="text-effect">
  <span class="fx-ch" style="--i:0;--n:9;--rev:8;--mid:4">Y</span>
  <span class="fx-ch" style="--i:1;--n:9;--rev:7;--mid:4">o</span>
  <span class="fx-ch" style="--i:2;--n:9;--rev:6;--mid:4">u</span>
  <span class="fx-ch" style="--i:3;--n:9;--rev:5;--mid:4">r</span>
  <span class="fx-ch" style="--i:4;--n:9;--rev:4;--mid:4"> </span>
  <span class="fx-ch" style="--i:5;--n:9;--rev:3;--mid:4">t</span>
  <span class="fx-ch" style="--i:6;--n:9;--rev:2;--mid:4">e</span>
  <span class="fx-ch" style="--i:7;--n:9;--rev:1;--mid:4">x</span>
  <span class="fx-ch" style="--i:8;--n:9;--rev:0;--mid:4">t</span>
</div>
Category
Entrance & Kinetic
Type
Animated
Browser support
All modern browsers
Capabilities
perLetter

Related Entrance & Kinetic effects