The Blog and Portfolio of Jason Olney
February 23, 2012 by Jason

Color Musings

I don’t want to alarm anyone, but magenta is not a real color. It’s totally not in the rainbow. Every other color can be made from a single wavelength of light except poor magenta. In reality, magenta is how we see a combination of violet and red. Remember that color wheel you learned about in art class? Lies! Color doesn’t exist in a circle; it’s a straight line with red on one end and violet on the other.

Not only that, but we can only see a sliver of the entire spectrum of light. There are colors before red and past violet that most of us can’t see. I say most of us because normally, we have red, blue and green cones (color sensors in our eyes) which let us see about 10 million different colors. But some women may have an extra kind of cone which increases the amount of color they can see! It’s kind of like color-blindness in reverse.

Sight is the only one of our senses that lets us experience things that are billions of light years removed from us. Without sight, we would never know about the stars. And without color, we may never know what stars are made of. You see, different molecules or elements absorb different parts of the spectrum. We can tell the composition of the stars by looking for gaps in the light that they produce. Those gaps tell us exactly what the star is made of.

We can also use color to tell us the age of the universe! Much like the siren of a fire truck will change pitch as it passes by, so does color. This is called the Doppler Effect. If something is moving away from us, the color moves towards red. If it’s moving towards us, it moves towards blue. It turns out that almost everything in the universe is moving away from us. By calculating how far away the stars and galaxies are and how fast they are moving, we can determine when they all would have been in the same spot. Bang! You have the birth of the universe about 13 billion years ago.

I’d like to see sound do that!

Share on Twitter
  •   •   •   •   •
February 16, 2012 by Jason

I’ll Put A Hex On You

Happy Thursday! I stumbled upon this great website, What the Hex where you are given a choice of colors and a hex number and you have to pick which color the hex number represents. I realized that I could actually do this! It takes time and a little math, but when you understand how hex numbers work, you can too.

Every web designer recognizes hex numbers. For those who don’t know, they are a string of six letters and/or numbers that represent one of 16,777,216 colors that can be used on the web. But what do those numbers and letters represent?

RBGFirst, to understand hex numbers you have to understand RGB numbers. RGB stands for Red, Green and Blue. These are the primary colors of light (you know, the stuff your monitor uses). You can combine these three colors to make just about any color you can think of. These colors are measured on a scale from 0 to 255; 0 is no color and 255 is total saturation. Red and Green make Yellow, Red and Blue make Magenta, Blue and Green make Cyan. No color at all is black. If you combine all three colors at total saturation you get white.

You can get a good idea of the color of an RGB number if you know how they work. For instance, 255, 0, 0 is bright red. Red is as high as it can go, but green and blue are non-existent. 128, 0, 0 is also red, but darker. 255, 255, 0 is a bright yellow (the weirdest part of RGB is getting used to red and green making yellow). 82, 182, 224 is a baby blue. There is a lot of blue and good deal of green which make a cyan leaning towards blue. The added red subdues the color a bit. When all three values are equal, the outcome is a neutral color. 72, 72, 72 is a dark grey while 215, 215, 215 is a light grey.

RGB Examples

Mystery ColorI look at RGB numbers by highest to lowest number. So if I have 143, 45, 120 I think, red is most prominent at 143, then blue is a close second at 120. The green is low, so I can tell that the color is dominated by red and blue which make magenta. There is more red than blue, so the color will lean that way. This color is a slightly reddish purple. The 45 in the green means that it is a somewhat less saturated purple. The closer the green gets to the other two numbers, the closer it gets to being neutral.

Hex Numbers

So what does this have to do with hex colors? “Hex” is short for “hexadecimal”, a fancy way of saying base sixteen. We usually do things in base 10. We go from 0 to 9 then we add a digit and reset the counter to make 10. Base 16 is the same way, but instead of resetting after 9, another digit is added after you count past “f”. In hex numbers, “a” is 10, “b” is 11, etc. all the way to “f” which is 15. So if we break down a hex number like “2d”, we know that d=13 plus “20” which instead of being 10×2 is 16×2 which equals 32. 32+13=45. Therefore, “2d”=45. “ff” is 15+16×15=255 (look familiar?). That’s right! A hex number is an RGB number in disguise. The first two “numbers” are red, the second two are green and the last two are blue. Convert the hex numbers to base 10 numbers and you have the RGB value. If you can tell a color from reading the RGB number, you can do the same thing with hex numbers.

Share on Twitter
  •   •   •   •   •