Tuesday, January 24, 2017

The long, medium, and short of the cones

Color is three-dimensional. I've said that before. Almost four years ago, I blogged about how it is not possible to arrange all your crayons in a line. This led to a discussion about how you need three numbers to uniquely identify any color, because color is three dimensional. Hence, when we describe a color, we need three attributes.

In an RGB camera or on a computer monitor, those attributes are the intensity of red, green, and blue. In the Munsell color system, the attributes are hue, value, and chroma. In the CIELAB system, the three coordinates are L*, a*, and b*. In any color space, there are three.

Actual photomicrograph of the strawberry, lime, and blueberry cones in the eye

Why is color three-dimensional?  Simply put, it's because we have three types of color sensors (called cones) in our eye.

In case this is starting to sound familiar, I have talked about the three sensors before. I blogged about how having three color sensors can lead to something called metamerism, where two objects can have identical colors under one light, but look different under another. I have blogged about colorblindness which is caused by missing one or more of the three cones. This came out in a blog about apps for testing for colorblindness, And then a followup blog post about colorblindness, and in one which asked the metaphysical question about whether two people see color the same way.

But today, I want to talk more about what those three cones look like.

Rainbowology 101

Time to pound some Fezziks into your head

Below is an artist's rendition of a rainbow. I like saying that my drawings are artist's renditions cuz it makes me feel like an artist. But perhaps it would be better if I call this a scientist's rendition, since I did actually put a little effort into making it anatomically correct. I am referring to the spacing and positions of the colors and the numbers on the scale below the rainbow.

The scale at the bottom is in wavelength and is measured in nanometers (abbreviated nm). A nanometer is a really tiny unit of measurement ... like about the width of a dent in a hair on a freckle on the butt of a baby flea that is the runt of the litter. A nanometer is the distance I will move over in the middle of the night when my wife tells me I'm hogging the bed. There is a whole lotta Fezziks behind wavelength and nanometers and how they got involved with rainbowology, but that would be getting off the topic. For our purposes, a nanometer refers to a position in the rainbow. At one end (400 nm) light is violet, and at the other end (700 nm) it's red.

If I wanted to be pedantic, I might extend the rainbow a bit. We can see light, however faintly, as low as 380 nm, and all the way up to 780 nm. So, I am lying when I say that my rainbow is anatomically correct. But it is a useful lie.

Strawberry, lime, and blueberry?

The obvious first guess is that there must be one set of cones in the eye that respond to the red part of the spectrum, one set that respond to the green part of the spectrum, and one set that respond to the blue part of the spectrum. Go RGB! 

Let's assume that the blue cones respond to light that is between 400 nm and 500 nm, the green cones respond to light that is between 500 nm and 600 nm, and the red cones respond to light between 600 nm and 700 nm. The top half of the picture below shows a graph of the sensitivity of each of the three cones as a function of position in the rainbow. Below that, we see the hypothetical rainbow that such an eye would see.

First guess at the response of the cones.

I don't know what you see when you look at a rainbow, but my rainbow has more that three colors. So, saying that the three cones respond each to their own 100 nm wide part of the rainbow is not just a lie. It's a lie that isn't even useful. The worst kind, if you ask me.

One of the difficulties with the first guess model is that it has the cones responding equally to all wavelengths within their respective ranges. That is why the first guess rainbow looks so blocky, and to be honest, very few light sensors in the real world have such a flat response.

So, let's tweak our hypothesis a bit. The graph below shows a second guess at sensitivity of the three hypothetical cones in the eye. So, as before, the blue cones will collect light that is in the range from 400 nm to 500 nm, but they are less sensitive near the ends of the ranges.

Second guess at the response of the cones

Note that the hypothetical rainbow has a decidedly more natural look, but it still doesn't look like a rainbow. I like my rainbows (and my brandies) with a little splash of orange. And then there's the dark areas. I don't ever recall seeing black listed as one of the colors of the rainbow.

Strawberry, strawberryish-lime, lime, limish-blueberry, and blueberry?

You know when you get one of those triple scoop cones? The fun part is when you are transitioning from one ice cream to another. You get a bite with some strawberry and some lime. You're not sure how much of each will be in the bite, and you're not sure how peacefully the two flavors will coexist in your mouth. But it will be fun. 

We can try that with our hypothetical cones... mush together the responses of the strawberry with the lime, and the lime with the blueberry. In this third guess, the responses of the cones have a significant overlap. So, if light at 500 nm comes in, both the green and the blue cones stand up and proudly wave their little neurons to say that they see the light.

Third guess at the response of the cones

I think that this has enough of the rainbow vibe to get Kermit the Frog to reach for his banjo. But when it comes to anatomical details, I think we can do a little better. Note that the yellow in the third guess rainbow is at 600 nm, when in reality, it's zip code is pretty close to 570 nm under cool lighting and 580 nm under warm lighting. Sky blue is another color that doesn't quite land in the right spot. I would really like for it to slide down from 510 nm to maybe 470 or 480 nm.

Based on that, I adjusted the width and position of the three hypothetical cone responses. Here is what I come up with - my final guess at the spectral sensitivity of the three cones in the human eye. Note that this analysis is pretty rudimentary. This was just a Gedanken - thought experiment. No lab rats were inconvenienced by the experiments described herein.

My fourth and final guess

The real answer

How close did I come? This last image shows one reliable estimate of the response of the three cones.

A guess from some real experts

I am rather pleased with my guess. I did of course, have the benefit of knowing what the real response looked like, and all the time in the world to rationalize my own estimate. But, I think the point has been made that the response of the three cones in the eye is not as simple as red-green-blue.

In fact, the responses of the cones really aren't red, green, and blue. There was a movement to call them by the Greek letters rho, gamma, and beta. Clever... you know? But the official designation is now to call them L, M, and S cones. L stands for long, or long wavelength, and it is the curve that is furthest to the right - the one we would be tempted to call red. M stands for medium, and it is the one in the middle. I still kinda think of it as green. And S is the short wavelength cone, the one that is furthest to the left. Speak kindly to it. It's kinda blue.


Why do I bother with all this explanation? First off, just cuz it's fascinating. Anything to do with color is gosh-darn interesting.

But this overlap between the L and M cones is kind of a head-scratcher. In those brief moments when I think like an engineer, I often think about stuff like how reducing the correlation between sensory channels increases the entropy of the system - the efficiency of information gathering. Based on that, I would think that the engineers who designed the human eye would have avoided overlap, especially such an egregious overlap.

But while Dr. Eva Lution (the designer of the human eye) doesn't always come up with the best designs, the poor designs are mercilessly discarded. I am left with the conclusion that maximizing entropy might not be the only worthwhile goal.

Note that as we slowly move upward in the rainbow from green to red, the response from the M cones is decreasing while the response from the L cones increases. This has the effect of accentuating the change, since the human visual system relies on comparison of L and M to discern greenish to bluish. Thus we see very rapid change, with green, yellow-green, yellow, orange, reddish-orange, and red all packed into 70 nm. If you are a photon out to have a wild time, this is where the action is.

There was one blogpost of mine about why we evolved to have three different colors sensors. I argued in this post that the addition of the L cones allowed us to see the difference in leaves as they change color. The additional cone also makes our eyes sensitive to a change in hemoglobin at the surface of the skin. This has some clear advantages for a social animal who does not have fur on its face. (With the exception of color scientists, who have beards and have yet to evolve into anything useful.)

Oh... what a little L cone can do

And that, dear reader, is why the L and M cones have such flagrant overlap.


  1. Great explanation! Although I would have preferred your treatise using Fizziks, which involves frosty adult beverages, instead of Fezziks, which involves a getting a middle-eastern hat and learning secret handshakes.

  2. Hi John,
    Nice approach. I remember a paper given during the cgiv in France about 10 years ago from a mathmatician who did a similar excersize. And came indeed to the same conclusion. Looking forward to your next post.
    Roel, CTC, Netherlands.

    1. That fellow must have been absolutely brilliant for coming up with the idea!

      I developed it over 20 years of teaching a basic color theory course.