Changing the color of the background over the day

I wanted to make a background, which changes it's color (brightness) over the day, for example at 2 pm the background is white or yellow, and at 10 pm it's black or some dark blue. I've already tried some ways, but I didn't managed it to get the result I wanted to get. Can anyone help me please?

You want a color background only? Or an image colored?

I'm going to give you a formula to change the colors in the background.

You need to put this formula in the color of the background.

$if(df(hh)>=14 & df(hh)<=21,colorcodewhite,colorcodeblack)$

you need to put the color codes like , ffffffff(white) or the colors that you want