Saturday, January 17, 2015

I wrote a clock!

So, I wrote a clock.
I based it on an analogue clock I had written for a tomato timer app (still working on that), but I added a color variation by the time, to make it cleaner. Writing the clock itself was just an exercise in Canvas, and the source code is all up there for everyone to browse. The hardest part to write was probably the color selection function, but it's tricky to make a function that's smooth, but also visually pleasing. I don't know if I've hit on a great one, but I think this one looks alright. It varies the red color based on the hour, the green based on the minutes and the blue based on the seconds, though it tweens a lot so that the transition is more smooth. I hope you like it!

No comments:

Post a Comment