Live data from Hacker News

The Colour Clock

thecolourclock.co.uk

11–20 of 95 posts

Re: The Colour Clock

#11
post #8

Simple & beautiful. Small criticism: Why Flash?

It should be simple enough to implement in HTML - it looks like it's just doing (seconds since midnight × 16777215 / 86400), converting to hex and using that as a colour. Toggling between "clock" and "colour" mode would be a bit more difficult, but doable.

Anyone feeling up to the challenge?

Re: The Colour Clock

#13
post #9

The hex clock seems to jump every once in a while, probably compensating for the large difference in the number of hexadecimal color values and seconds in a 24 hour day. How are the color values related to the seconds here?

As I understand: hours are red, minutes are green, seconds are blue. Simply formulated as HTML color #HHMMSS (and with each component scaled appropriately to 00..FF so that 00:00:00 is #000000, 23:59:59 is #FFFFFF)

Re: The Colour Clock

#16
I wonder how well the color blind can detect second to second changes in hue? Not a complaint, just a genuine curiosity.

Any color blind out there care to comment?

Re: The Colour Clock

#17
post #8

Simple & beautiful. Small criticism: Why Flash?

It should be simple enough to implement in HTML - it looks like it's just doing (seconds since midnight × 16777215 / 86400), converting to hex and using that as a colour. Toggling between "clock" and "colour" mode would be a bit more difficult, but doable. Anyone feeling up to the challenge?

Here's my attempt: http://brisy.info/colors It treats each section of the time as a hex pair, see colors.js for implementation.

edit: Hours corrected. Thanks wladimir

Re: The Colour Clock

#18
post #17

Earlier quoted context omitted.

It should be simple enough to implement in HTML - it looks like it's just doing (seconds since midnight × 16777215 / 86400), converting to hex and using that as a colour. Toggling between "clock" and "colour" mode would be a bit more difficult, but doable. Anyone feeling up to the challenge?

Here's my attempt: http://brisy.info/colors It treats each section of the time as a hex pair, see colors.js for implementation. edit: Hours corrected. Thanks wladimir

Nice! One small correction: ((h / 60) * 255) should be ((h / 24) * 255) probably

Re: The Colour Clock

#19
post #15

Awesome idea. I took some time to rewrite in HTML5: http://brisy.info/colors/ Though the colours I'm getting are different. I wonder why.

... perhaps because it should be h / 24 instead of h / 60 ?

  body.animate({"background-color":
                 "rgb(" + parseInt((h / 60) * 255) + "," +
                      parseInt((m / 60) * 255) + "," +
                      parseInt((s / 60) * 255) + ")"});

Re: The Colour Clock

#20
post #19
post #15

Awesome idea. I took some time to rewrite in HTML5: http://brisy.info/colors/ Though the colours I'm getting are different. I wonder why.

... perhaps because it should be h / 24 instead of h / 60 ? body.animate({"background-color": "rgb(" + parseInt((h / 60) * 255) + "," + parseInt((m / 60) * 255) + "," + parseInt((s / 60) * 255) + ")"});

Yes, just corrected this thanks.
Post reply on HN