Isn’t it cool?

So, one of the ways computers define colors is with “hexadecimal” (six-number) codes. Some thoughtful person realized that the time (in an hours:minutes:seconds format) is also six numbers, and created this website, which displays whichever hexadecimal color the current time corresponds to. As I’m writing this, in my time zone, it’s almost 7:15PM, and that apparently corresponds to this dark purple:

So I’m looking at this thing, and it occurs to me– it won’t go through *every* color, because the minutes and seconds only go up to 59, and the hours only go up to 23, instead of 0-99 for each of them. Plus, some hexadecimal colors have letters in them, A through F.

How many colors does the clock show? Half of them? A quarter? And which colors are they? Most of the ones I’ve seen are dark purple, blue and green, but is that true overall or just at the times I’ve checked it?

Part of me wants to figure this out.

This is what happens when your parents are teachers.

OK I’m going to do this:

—————————–

Ballpark guesses:

This is a good explanation of how hex codes correspond to colors.

So, in the color clock, the hours determine the amount of red, the minutes determine the amount of green, and the seconds determine the amount of blue.

Since the hour can only go up to 23, the clock will never show a really bright red. At 23:00:00 it’ll be a dark maroon, that’s the reddest it can be. It’ll mostly be shades of green, blue and turqiouse, because the minutes and seconds (the green and blue) are usually larger than the hours (the red).

The color clock will never have really light/bright colors, because the highest number it can have in any slot is 59.

The color clock will also skip a few chunks of colors within the 0-59 range, because of how hex codes use letters.

—————————–

Mathing:

It’s easy to find out how many hexadecimal colors there are, although it’s a very big number. Numbers 0 through 9 plus letters A through F is 16 different numbers/letters that can be in each position, and there are six positions in each hex code.

This formula tells you how many different ways N things can be arranged into K positions. It comes out to 5,765,760.

Yeah.

How many colors does the color clock display?

Since the color clock uses a 24-hour clock, every second of the day is a unique number, so the answer to this question is the same as the number of seconds in a day:

60 seconds/minute * 60 minutes/hour * 24 hours/day = 86,400 seconds/day.

That’s much, much less than the total possible number of colors. It’s about 1%.

—————————-

The color of the moment when I finished this post: