<div id="circle" style="width:100px; height:100px; border-radius:50px; background-color:RGB(255,0,0)"></div>
<script>
(function(){
var div=document.getElementById("circle");
var lastR=255;
var lastG=0;
var lastB =0;
setInterval(()=>{
div.style.backgroundColor="RGB("+lastR+","+lastG+","+lastB+")";
if(lastG<255)
lastG++;
else
lastG=0;
if(lastG<255){
lastB++;
}
else
lastB=0;
},100);
})();
</script>