DEV Community

Cover image for Rainbow Webpage
Mafee7
Mafee7

Posted on

3 3

Rainbow Webpage

Want To Add A Hidden Feature In Your Webpage For Users to Discover? Do This:

Rainbow Webpage

var i = 0; // Define varible "i"
setInterval(function(){
  document.body.style.filter = `hue-rotate(${i}deg)`; // Set Hue Of Page To i
  if(i == 360){ 
    i = 0; // Set i to 0
  } else{
    i = i + 2; // Change i by 2
  }
}, 60);
Enter fullscreen mode Exit fullscreen mode

enjoy!

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay