tags: Dunstan

Action executed in 0.000

Each Tag


Common tags - number of posts

weather (1), PHP (1), color (1), TrickleUp (1), style (1),

Colors Based on Time

The colors on my website are now a function of time. The header background color is based on the day of the year representing the seasons and and body background color is based on the hour of the day.

I've had this idea for a very long time and finally i've implemented it. How did i do it you ask? My stylesheet is dynamically generated using PHP.

There's still some work to do. First, the color of text much change along with the background color. Second for the season colors, i need something like white for Winter, green/yellow for Spring, orange/red for Summer, and brown/gray for Autumn. The colors need to fade from one to the next. Third, other parts of the web page need to be included.

Another feature i'd like to add is modifying the colors based on the weather at the time. I've seen this done on Dunstan's Blog.