AboutI came across a post in my Facebook feed today that linked to The Colour Clock by Jack Hughes. It's a pretty neat idea - the current time is translated into a hexadecimal color value and applied to the background of the page. So as the time changes, the background color of the page changes as well.The only thing is, it's in Flash so if
you're on an iOS device, you won't be able to see it. Or if you'd like
to pull it up on your web-enabled TV or other device that doesn't have
Flash. So I spent my Sunday afternoon porting it over to JavaScript and
this is is the result - The Color Clock. DownloadYou don't really need to download anything to try this out - it's hosted at http://colorclock.nogoodatcoding.com. But if you'd like to check the source or fork your own repository, the project is hosted on GitHub.How It WorksThe project isn't too complicated - the basic idea is to map each of hours, minutes and seconds toR, G and B values to get a hex color string for the page background.
CreditsThe credit for the idea and the Flash implementation rests with Jack Hughes. I've only taken his idea and ported it to JavaScript because I thought it'd be a fun way to spend a Sunday afternoon! |
Projects >