BleepingComputer.com: Hex Color Clock

Jump to content

How to use this Forum


HI! Please do not use this General Chat forum for computer support questions. If you are looking for support, please post your question in the appropriate forum. For HijackThis logs please post your log here:




Virus, Trojan, Spyware, and Malware Removal Logs



Welcome to the site and looking forward to your introduction posts!
  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Hex Color Clock Programming Challenge

#1 User is offline   bigalexe 

  • Forum Regular
  • PipPipPip
  • Find Topics
  • Group: Members
  • Posts: 152
  • Joined: 04-April 08
  • Gender:Male
  • Location:Michigan, USA

Posted 04 April 2010 - 12:25 AM

I have thought up something that is either really boring or really cool depending on your inner nerd level. A CLOCK reading Hours/Minutes/Seconds by way of displaying a Hex generated Color.

How will this even work?

A hex color is specified as three hex values such as 0A 12 BF, in the end we get 16 million color possibilities and luckily for us that number is greater than 86400 which is the number of colors our clock will generate (1 for each second in a day). The clock itself will consist of a single square displaying a solid color, that color will be generated by way of specifying 3 different hex values which will be the hours/minutes/seconds of the time using a 24 hour clock, so at 20:16:59 it will be a shade of Navy Blue.

I don't know anything about programming for the PC and so I cannot program this myself. I am offering up the idea to anyone that feels like running with it. Some ideas I have come up with are to help give more varied results:

-Use the 24 hour clock, it gives you double the colors and double the fun
-Use 24, and 60 in place of 0 respectively where possible. This gets you more color and less black. Probably can be done by specifying 0=60
-Using a multiplier to spread out the numbers may help generate brighter colors. Such as converting the value to a percent of its place (1 minute is 1.5% of an hour) and then use that percent of 256 which is the total possible for 2-digit hex. Of course you would have to make the program round the value to a whole number at the end so 1 minute would give you a 4, as 4.26 would not really work for this.

This is just an idea I came up with, I don't know how to it because the closes to programming I have gotten is writing CNC G/M Codes, TI-83 calculator, some robotics, PLC Ladder Logic and some digital electronics logic. I have no experience on the PC platform besides TRYING to teach myself Visual Basic with MS Visual Studio and in the end I decide to stay with Industrial Electronics and leave the PC to others.
AMD Phenom II X6 2.8ghz
8GB DDR3 RAM
XFX ATI Radeon HD6850 1 GB DDR5, 26" Widescreen HDMI
500GB + 80GB HDD
Windows 7 Pro, Mozilla Firefox, AutoCAD 2011, Solidworks 2009
1/19/2012

#2 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,834
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

Posted 07 April 2010 - 01:37 AM

I tried making this hex clock in javascript. I expected some rainbow like colors, but this looks awful :thumbsup:

See the clock : http://silence30.byethost4.com/

#3 User is offline   tg1911 

  • Lord Spam Magnet
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Site Admin
  • Posts: 18,573
  • Joined: 06-May 04
  • Gender:Male
  • Location:SW Louisiana

Posted 07 April 2010 - 09:16 AM

Doesn't look too bad, Romeo29.
Looks kind of cool.
Couple of suggestions, though (ain't there always? :thumbsup:):

Use double digits.
Instead of 9:2:5, go with 09:02:05.
Less confusing. :flowers:

Make it round, or oval, instead of rectangular.

Stay away form the darker colors.
When it hit 9:00 AM, my time, it went black, until the colors started to lighten up.
Black digits, on dark colors don't work too well. :trumpet:
Or, use pure white for the digits, and leave out any shade of white.
White is boring, anyway. :inlove:
MOBO: GIGABYTE GA-MA790X-UD4P, CPU: Phenom II X4 955 Deneb BE, HS/F: CoolerMaster V8, RAM: 2 x 1G Kingston HyperX DDR2 800, GPU: eVGA GeForce 9800 GTX+, PSU: Antec TruePower Modular 750W, Soundcard: Asus Xonar D1, Case: CoolerMaster COSMOS 1000, Storage: Internal - 2 x Seagate 250GB SATA, 2 x WD 1TB SATA; External - Seagate 500GB USB, WD 640GB eSATA, 3 x WD 1TB eSATA

Become a BleepingComputer fan: Facebook

#4 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,834
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

Posted 07 April 2010 - 02:00 PM

Thank you tg1911 for your suggestions. I updated the clock as soon as I got back home (pleasures if being single).

I inverted the color of the background for obtaining the color of the digits to display them in contrast. The clock does not appear round in Internet Explorer as it does not support CSS3 that much. Perhaps IE9 would support more.

#5 User is offline   Andrew 

  • Bleepin' Night Watchman
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 7,423
  • Joined: 05-December 05
  • Gender:Not Telling
  • Location:Right behind you

Posted 07 April 2010 - 05:52 PM

Here's my entry. That was fun!
Help us help you. If HelpBot replies, you MUST follow step 1 in its reply so we know you need help.
Posted Image
Boredom Software Stop Highlighting Things

#6 User is offline   tg1911 

  • Lord Spam Magnet
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Site Admin
  • Posts: 18,573
  • Joined: 06-May 04
  • Gender:Male
  • Location:SW Louisiana

Posted 07 April 2010 - 05:53 PM

Looks pretty good, for the most part, Romeo29.
There are a couple of spots where the inverted colors are real hard on the eyes, but other than that, it looks good.

Quote

The clock does not appear round in Internet Explorer
Ahhhhh, who cares about IE, anyway. :thumbsup:
MOBO: GIGABYTE GA-MA790X-UD4P, CPU: Phenom II X4 955 Deneb BE, HS/F: CoolerMaster V8, RAM: 2 x 1G Kingston HyperX DDR2 800, GPU: eVGA GeForce 9800 GTX+, PSU: Antec TruePower Modular 750W, Soundcard: Asus Xonar D1, Case: CoolerMaster COSMOS 1000, Storage: Internal - 2 x Seagate 250GB SATA, 2 x WD 1TB SATA; External - Seagate 500GB USB, WD 640GB eSATA, 3 x WD 1TB eSATA

Become a BleepingComputer fan: Facebook

#7 User is offline   bigalexe 

  • Forum Regular
  • PipPipPip
  • Find Topics
  • Group: Members
  • Posts: 152
  • Joined: 04-April 08
  • Gender:Male
  • Location:Michigan, USA

Posted 07 April 2010 - 10:18 PM

Cool, happy someone was able to make the idea.

I like the java version because it keeps with the idea of being minimalist in the interface. I also like Andrews because it also displays the Hex and Binary values so it is easy to show to a non-techie and sort of explain what is going on.

This post has been edited by bigalexe: 07 April 2010 - 10:23 PM

AMD Phenom II X6 2.8ghz
8GB DDR3 RAM
XFX ATI Radeon HD6850 1 GB DDR5, 26" Widescreen HDMI
500GB + 80GB HDD
Windows 7 Pro, Mozilla Firefox, AutoCAD 2011, Solidworks 2009
1/19/2012

#8 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,834
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

Posted 07 April 2010 - 10:30 PM

Andrew for some reason I cannot extract the Zip archive. This happens when I try :
Posted Image

Here is error video

This post has been edited by Romeo29: 07 April 2010 - 10:42 PM


#9 User is offline   DSTM 

  • "Bleepin' Aussie Addict"
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 2,649
  • Joined: 14-October 06
  • Gender:Male
  • Location:SYDNEY-AUSTRALIA

Posted 07 April 2010 - 10:40 PM

7ZIP opened the Zip.

This is all I got.

Posted Image
Winrar.





Posted Image

This post has been edited by DSTM: 07 April 2010 - 10:45 PM















#10 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,834
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

Posted 07 April 2010 - 10:48 PM

Wow! Thanks DSTM :thumbsup: Looks like it used some non-standard zip method.

Very nice clock Andrew :flowers:

#11 User is offline   Andrew 

  • Bleepin' Night Watchman
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 7,423
  • Joined: 05-December 05
  • Gender:Not Telling
  • Location:Right behind you

Posted 07 April 2010 - 11:06 PM

Thanks! I'm glad you like it!

And yeah, I used 7zip with the Bzip2 algorithm to create the zip file. Looks like I should stick to LZMA from now on!

This post has been edited by Andrew: 07 April 2010 - 11:07 PM

Help us help you. If HelpBot replies, you MUST follow step 1 in its reply so we know you need help.
Posted Image
Boredom Software Stop Highlighting Things

#12 User is offline   tg1911 

  • Lord Spam Magnet
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Site Admin
  • Posts: 18,573
  • Joined: 06-May 04
  • Gender:Male
  • Location:SW Louisiana

Posted 07 April 2010 - 11:15 PM

What did you zip it with, Andrew?
I can't extract it with Windows zip utility.

Posted Image

EDIT:
Never mind.
Just saw your last post.
Guess I won't be able to see it.
MOBO: GIGABYTE GA-MA790X-UD4P, CPU: Phenom II X4 955 Deneb BE, HS/F: CoolerMaster V8, RAM: 2 x 1G Kingston HyperX DDR2 800, GPU: eVGA GeForce 9800 GTX+, PSU: Antec TruePower Modular 750W, Soundcard: Asus Xonar D1, Case: CoolerMaster COSMOS 1000, Storage: Internal - 2 x Seagate 250GB SATA, 2 x WD 1TB SATA; External - Seagate 500GB USB, WD 640GB eSATA, 3 x WD 1TB eSATA

Become a BleepingComputer fan: Facebook

#13 User is offline   Andrew 

  • Bleepin' Night Watchman
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 7,423
  • Joined: 05-December 05
  • Gender:Not Telling
  • Location:Right behind you

Posted 08 April 2010 - 12:35 AM

Version 2 is now available. New feature! Completely pointless conversion of numeric data into musical tones via MIDI!! :thumbsup: Also, bigalexe's idea, already implemented in Romeo29's version, of multiplying the color value by 4.25 has been stolen and claimed as my own.

Now compressed using less geeky methods (at the expense of being 81.92KB larger or using a proprietary algorithm [RAR], depending on which one you get):

http://www.boredomsoft.org/hosted/hexclock.zip
http://www.boredomsoft.org/hosted/hexclock.rar

This post has been edited by Andrew: 08 April 2010 - 12:41 AM

Help us help you. If HelpBot replies, you MUST follow step 1 in its reply so we know you need help.
Posted Image
Boredom Software Stop Highlighting Things

#14 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,834
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

Posted 08 April 2010 - 05:48 AM

Nice Andrew :thumbsup: It sounds like someone is playing piano :flowers:

#15 User is offline   tg1911 

  • Lord Spam Magnet
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Site Admin
  • Posts: 18,573
  • Joined: 06-May 04
  • Gender:Male
  • Location:SW Louisiana

Posted 08 April 2010 - 08:19 AM

Nice one, Andrew.
Now, a part of my desktop. :trumpet:

If there was just some way to adjust opacity, set as "always on top", with "click-thru" ability ............... :thumbsup: :flowers:
MOBO: GIGABYTE GA-MA790X-UD4P, CPU: Phenom II X4 955 Deneb BE, HS/F: CoolerMaster V8, RAM: 2 x 1G Kingston HyperX DDR2 800, GPU: eVGA GeForce 9800 GTX+, PSU: Antec TruePower Modular 750W, Soundcard: Asus Xonar D1, Case: CoolerMaster COSMOS 1000, Storage: Internal - 2 x Seagate 250GB SATA, 2 x WD 1TB SATA; External - Seagate 500GB USB, WD 640GB eSATA, 3 x WD 1TB eSATA

Become a BleepingComputer fan: Facebook

Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users