What color is it? Time in colors

edited December 2014 in Share Your Work


I've developed What color is it?, a clock that shows time in colors, in Processing.js a couple of days ago: http://whatcolorisit.sumbioun.com/

Screenshot of What color is it?

The project is derived from whatcolourisit.scn9a.org, a clock that plots time as an hexadecimal value to change the color of the background. I thought it might be more interesting to develop an algorithm to cover the entire spectrum in 24 hours, changing luminosity according to variations of day and nighttime.

Using three sine functions, the code translates the time of day into a RGB hue value, covering the entire spectrum in 24 hours. At daytime and nighttime, another sine function modulates the luminosity, so the color is modified accordingly. A fifth function modulates the current color to provide variations every second, altering the saturation and hue, since the previous sine functions are not enough to provide values for changing colors every second of the day.

The project is open source; its code can be accessed here: https://github.com/sumbioun/whatcolorisit

Hope you like it.


Sign In or Register to comment.