Number | Color |
0 | Black |
1 | Blue |
2 | Green |
3 | Cyan |
4 | Red |
5 | Purple |
6 | Brown |
7 | Light Grey |
8 | Dark Grey |
9 | Light Blue |
10 | Light Green |
11 | Light Cyan |
12 | Light Red |
13 | Light Purple |
14 | Yellow |
15 | White |
And after a while, I find myself wishing there was some way this would make sense to me, so I wouldn't have to keep having to look it up. The eureka moment hit me recently, years later after I typed my first "Hello World" in QBasic, when I was staring at the table again, and realized that it had made sense all along - I just hadn't seen it. And I would have seen it much sooner if I had just been a little more binary about it. Let's look at the table again, and this time, convert the first eight numbers numbers to binary.
Number | Color |
000 | Black |
001 | Blue |
010 | Green |
011 | Cyan |
100 | Red |
101 | Purple |
110 | Brown |
111 | Light Grey |
8 | Dark Grey |
9 | Light Blue |
10 | Light Green |
11 | Light Cyan |
12 | Light Red |
13 | Pink |
14 | Yellow |
15 | White |
Now, if you understand the principle of RGB, you'll notice that the first eight colors correspond pretty well, if the first bit represents the Red component, the second bit represents the Green component, and the third bit represents the Blue component. So Blue would be 001, Red would be 100, and Purple would be 101, a combination of Blue and Red! And since 110 would be a combination of Red and Green, that would naturally give you Brown. And while in the natural world, Blue and Green will not give you Cyan, it will in RGB. Thus 011 gives you Cyan.
What about the other eight colors?
This is where it gets interesting. Notice that I've put the eight colors in a second column.Number | Color | Number | Color |
000 | Black | 8 | Dark Grey |
001 | Blue | 9 | Light Blue |
010 | Green | 10 | Light Green |
011 | Cyan | 11 | Light Cyan |
100 | Red | 12 | Light Red |
101 | Purple | 13 | Pink |
110 | Brown | 14 | Yellow |
111 | Light Grey | 15 | White |
You'll see that the colors on the right are all paler versions of the color on the left! Dark Grey is a lighter version of Black. Yellow is a lighter version of Brown. And White is definitely the lighter version of Light Grey.
Well, hot damn.
I could have kicked myself for not seeing this pattern earlier. I guess everyone's got their blind spots, eh?
Hue says this is hard?
T___T
T___T
No comments:
Post a Comment