portal/assets/js/color.js

16 lines
468 B
JavaScript
Raw Normal View History

color = 0
function colorRotate(){
color += 10
color = color%360
document.getElementsByClassName('screen-content')[0].style.filter = "sepia(94%) hue-rotate("+color+"deg) saturate(7) brightness(100%)"
}
if( Math.random() > 0.5){
if( Math.random() > 0.9){
2023-09-11 12:23:27 +02:00
setInterval(colorRotate, 50);
} else {
2023-09-11 12:23:27 +02:00
document.getElementsByClassName('screen-content')[0].style.filter = "sepia(94%) hue-rotate("+Math.floor(Math.random()*360)+"deg) saturate(7) brightness(100%)"
}
}