This is too cool…, though I had to modify the CSS for it to work for me. What I used:

.rainbow {
background-image: linear-gradient(90deg, #F79533 0%, #F37055 15%, #EF4E7B 30%, #A166AB 44%, #5073B8 58%, #1098AD 72%, #07B39B 86%, #6DBA82 100%);
background-size: cover;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

Related: -webkit-text-fill-color – MDN (ads)