Skip to content

Instantly share code, notes, and snippets.

@shayanjm
Forked from shhrr/color changer #pastels
Created March 5, 2014 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shayanjm/9359726 to your computer and use it in GitHub Desktop.
Save shayanjm/9359726 to your computer and use it in GitHub Desktop.
<body>
<script>
var colors = ["#F7977A","#F9AD81","#FDC68A","#FFF79A","#C4DF9B","#A2D39C","#82CA9D","#7BCDC8","#6ECFF6","#7EA7D8","#8493CA","#8882BE","#A187BE","#BC8DBF","#F49AC2","#F6989D"];
var i = 0;
setInterval(function(){
i++
if (i>=colors.length) {
i=0;
}
document.body.style.backgroundColor = colors[i];
},3500);
</script> </body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment