Source for demo by Christopher Otto.
setInterval(function(){t=new Date();document.body.style.backgroundColor="rgb("+t.getHours()+","+t.getMinutes()+","+t.getSeconds()+")";},2);