Hacker News new | past | comments | ask | show | jobs | submit login

let i = 0; setInterval(() => document.body.style.filter=`hue-rotate(${i++}deg)`, 16);

Disco mode!

(better to use requestAnimationFrame but I'm lazy atm)




There you go:

  let i = 0;
  function bump() {
      document.body.style.filter=`hue-rotate(${i+=2}deg)`, 16;
      requestAnimationFrame(bump);
  }
  requestAnimationFrame(bump);




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: