Skip to content

Instantly share code, notes, and snippets.

@shayanjm
Forked from shhrr/color changer #pastels
Last active August 29, 2015 13:57
Show Gist options
  • Save shayanjm/9359931 to your computer and use it in GitHub Desktop.
Save shayanjm/9359931 to your computer and use it in GitHub Desktop.
<body>
<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js'></script>
<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;
}
$('body').animate({ backgroundColor: colors[i]}, 'slow');
},3500);
</script> </body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment