JSFiddle - React, Tailwind, and code Playground

by Julien Etienne

HTML

<div>u</div>

CSS

div{
    width: 100%;
    height: 100%;
    position: absolute;
}

JavaScript

var lastTimestamp = +new Date;

function loop(f){
    var now = +new Date;
  var dt = now - lastTimestamp;
  
   var newTimeStamp = arguments[0]; 
var d = new Date();

var n =  (d.getMilliseconds() /1000 + Math.random() + Math.random()) / 3;
var w =  (d.getMilliseconds() /1000 + Math.random() + Math.random()) / 3;
var a =  (d.getMilliseconds() /1000 + Math.random() + Math.random()) / 3;    
    
var col = Math.floor(255 * n);
var col2 = Math.floor(255 * w);  
var col3 = Math.floor(255 * a);      
var div = document.getElementsByTagName('div')[0];
div.innerHTML = arguments[0];
div.style.backgroundColor = 'rgb('+col3+','+ col2+ ',' + col +')';
requestAnimationFrame(loop);    
   
}

requestAnimationFrame(loop);