Basically, I was making a clicker game, and after a certain thing happens, the background should gradually turn from blue to orange.
I am not exactly sure how to gradually change it, also, all of the things that say that they change the entire background actually don’t.
2
Answers
You should make a class for the background.
In JS just do to entirely change the background:
or you can make it a function that gets called on from an HTML tag. And to make it gradually change I am not exactly sure but try making editing your class in CSS and make it an animation there are plenty of tutorials for it.
Explanation is in the code