JSFiddle - React, Tailwind, and code Playground
by hmartiro
HTML
<html><body>
</body></html>
JavaScript
$(document).ready(function() {
spectrum();
function spectrum(){
var hue = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')';
var text = '-webkit-linear-gradient(-45deg, ' + hue + ' 0%, ' + hue + ' 100%)';
console.log(text);
//$('body').css('background',text);
$('body').animate({background: text}, 2500, spectrum);
}
});