Earlier quoted context omitted.
I missed it. It basically goes from white (well, very pale cyan) to bright red, right?
#FFFFFF to #000000 would be white to black.
The Colour Clock
91–95 of 95 posts
Re: The Colour Clock
#92Re: The Colour Clock
#93Earlier quoted context omitted.
I can not figure out how such a simple program can manage to take up 100% of my CPU, and despite that not be in sync with my actual clock (it's a random fraction of a second off). Has he not heard of sleep(1) ? Saying "it's flash" is no excuse, flash is perfectly capable of sleeping.
Updating a clock to display the correct time is actually difficult and involved, sleep(1) will not work! The problem reminds me of this Intel article on syncing video output [1] Basically, sleep(1) won't always align with clock updates, so sometimes a given time will display for more or less time than a second. This can be observed by opening the clock widget on Windows XP for example, it's very noticeable. I don't a…
Alternatively, use time() to only sleep the remaining timespan until the next second.
Re: The Colour Clock
#94Earlier quoted context omitted.
Honest question - what is the HTML5 part in here (as opposed to I rewrote it in HTML+CSS+JS)?
Even though the implementation above doesn't use any HTML5-specific features, the term is becoming a synonym for Dynamic HTML.
Re: The Colour Clock
#95Awesome idea. I took some time to rewrite in HTML5: http://brisy.info/colors/ Though the colours I'm getting are different. I wonder why.
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(…
http://www.coloringout.com/colorclock
someone should make the timezones selectable :)