I have this script that changes the color of the website as the page refreshes.
<script>
function random_bg_color() {
var x = Math.floor(Math.random() * 256);
var y = Math.floor(Math.random() * 256);
var z = Math.floor(Math.random() * 256);
var bgColor = "rgb(" + x + "," + y + "," + z + ")";
console.log(bgColor);
document.body.style.background = bgColor;
}
random_bg_color();
</script>
Would it be possible to modify it to show only specific colors at a given time?
Example in the morning a lighter color, a later color a little dark, and the night a completely dark color.
Or add an image in place of the color, or the 2, when it does not have a color it shows an image.