How do I animate a word such that each letter changes color with a range of 7 colors and all letters show diff colors at a time infinitely?
<div class="box">
<h1 class="logo animate__animated animate__bounceInDown">
<span class="cake d">D</span>
<span class="cake y">y</span>
<span class="cake n">n</span>
<span class="cake a">a</span>
<span class="cake m">m</span>
<span class="cake i">i</span>
<span class="cake x">x</span>
</h1>
</div>
here is the HTML word separated by span tags with some classes tags
:root{
--primary: #22D2A0;
--secondary: #192824;
--back: #192824;
--green: #1FC11B;
--yellow: #FFD913;
--orange: #FF9C55;
--red: #FF5555;
--aqua: #00ffff;
--color: #fbff00;
--blue: #4d1461;
text-align: center;
}
I want to iterate each letter with a different color so each letter changes color every millisecond with minimal code because I have tried animating each letter separately and it is bulky...if there is also a way to pause the animation on hover using javascript