Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var s = 0;
- var colorDirection = 1;
- setInterval(function () {
- document.body.style.backgroundColor = 'hsl(269, ' + s + '%, 50%)'
- s += colorDirection
- if (s > 100) {
- colorDirection = -1
- s = 100
- } else if (s < 0) {
- colorDirection = 1
- s = 0
- }
- }, 10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement