Skip to content

Instantly share code, notes, and snippets.

@minisbett
Last active July 10, 2024 13:03
Show Gist options
  • Select an option

  • Save minisbett/125cf681eda327f889ac1e36791420d0 to your computer and use it in GitHub Desktop.

Select an option

Save minisbett/125cf681eda327f889ac1e36791420d0 to your computer and use it in GitHub Desktop.
funny osu rgb
//
// Every X ms the hue changes by 1, and after 360 it went through all colors once.
// Might not do any change with low values as the code couldnt keep up,
// see it more as a minimum time for it to change to the next hue.
//
SPEED = 1; // minimum 360ms for full cycle
// dont mind this :D
let hue = 0;
setInterval(function() {
hue = hue == 360 ? 0 : hue + 1;
document.body.style.setProperty("--base-hue-override", hue);
}, SPEED);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment