|
|
|
|
|
by lkozma
5592 days ago
|
|
Here's a version that cycles through the colors continuously (without jumps). Now the numbers do not directly corespond to the color code anymore (they alternate going up-down). Also you can multiply by 256, as the maximum is not reached for any of the values. I uploaded it here: http://lkozma.net/colorclock/ d = t.getTime()/(1000 * 60 * 60 * 24),
...
body.animate({"background-color":
"rgb(" +
(((d%2)==1) ? parseInt((h / 24) * 256) : (255-parseInt((h / 24) * 256))) + "," +
(((h%2)==1) ? parseInt((m / 60) * 256) : (255-parseInt((m / 60) * 256))) + "," +
(((m%2)==1) ? parseInt((s / 60) * 256) : (255-parseInt((s / 60) * 256))) + ")"});
};
|
|
http://www.coloringout.com/colorclock
someone should make the timezones selectable :)