Displaying The Rainbow

True or false? Your green laser pointer is more powerful than your red one. The answer is almost certainly false. They are, most likely, the same power, but your eye is far more sensitive to green, so it seems stronger. [Brandon Li] was thinking about how to best represent colors on computer screens and fell down the rabbit hole of what colors look like when arranged in a spectrum. Spoiler alert: almost all the images you see of the spectrum are incorrect in some way. The problem isn’t in our understanding of the physics, but more in the understanding of how humans perceive color.

Perception may start with physics, but it also extends to the biology of your eye and the psychology of your brain. What follows is a lot of math that finally winds up with the CIE 1931 color space diagram and the CIE 2012 system.

Some people obsess about fonts, and some about colors. If you are in the latter camp, this is probably old hat for you. However, if you want a glimpse into just how complicated it is to accurately represent colors, this is a fascinating read. You can learn about the Bezold-Brücke shift, the Helmholtz-Kohlrausch effect, and the Abney effect. Maybe that’ll help you win a bar bet one day.

The post winds up in the strangest place: spectroscopy. So if you want to see how color representation applies to analyzing blue sky, neon tubes, and a MacBook display, you’ll want to skip to the end.

We’ve nerded out on color spaces before. In some cases, the right representation is everything.

23 thoughts on “Displaying The Rainbow

  1. In fairness the light I can see coming off my green Laser maybe the same power as my dimmer redness.

    But most likely if I could see IR I would see nearly as powerful IR laser!

    It’s quite shocking how poorly filtered typical flea market green lasers are.

    1. Yes, I have a “legal” green laser pointer purchased from a legitimate retailer stateside. I measured it to produce its advertised output power of 5 mW, and it’s all in the green — no measurable IR at either 850-ish or 1064 nm.

      I have another, purchased from a vendor in a mall in Beijing. Also labeled “5 mW” it actually puts out more than 100 mW of power, with only 50 mW of that in the green: The remainder is IR. This thing is truly hazardous, but at least it is highly visible.

      Interestingly, the higher power one is also more efficient: Drawing 1.5 watts to make the 50 mW, vs. the 300 mW the smaller one drinks to make 5 mW.

      1. It’s a real problem. They do sell cheapy short pass and notch/ir filters. But I don’t recommend the average person play with lasers >5mW even to affix a filter. Most people don’t realize how often light both reflects and transmits when interfacing with transparent media. A 20% reflection from a tilted filter while playing around can cause injury! I also doubt most cheap filters go beyond OD 2, which may matter depending on someone’s situation.

  2. All things being equal, yes, the green is more powerful than the red because of the way quantum physics works. Photons making up green light have a higher energy level than photons making up red light. It’s why they operate at a different frequency. That’s pretty much the whole electromagnetic spectrum in a nutshell.

    1. I think what the article is talking about is the reaponsivity of the human eye to different wavelengths and how the human eye is more responsive to the green part of the visible spectrum than others. For example it is true we see the same power green light source as brighter than the equivalent purple (lower wavelength) or red (higher wavelength). The average human eye is more efficient that way due to evolution. A lot of photodiodes and cameras have filters over their detection elements to help make them more “eye like”.

      1. Fish Sticks is right. By extrapolation from blue, green photons have more energy. Where the author messed up laying it out was this sentence: “They are, most likely, the same power.” There’s no basis in anything for that statement. “Two laser pointers from the universe of laser pointers are, most likely, the same power“??? As HaD never tires of pointing out, even two identically labeled laser pointers are often not the same power.

        1. But if fiddlesticks is right, and you alone possess the truth… One of you is not in possession of the truth! You agree with them so you have the same truth. Does that mean you are both wrong? Or possibly that you alone do not possess the truth? I might need a two year vacation to figure this out…

          1. Didn’t Captain Kirk feed a similar reasoning into several androids or computers leading to them saying “error… error… illogical” and self destructing ? (They may be eligible for compensation). Oh well so far I haven’t heard Schrodinger’s cat meow.

    2. 2.5mW of 555nm green is exactly the same power as 2.5mW of 670nm red. There will be greater photon flux for the red, as each carries less energy, but the power is the same. How the light interacts with matter, on the other hand, does vary.

      For example, is cesium is used as the target in a phototube, the green will be sensed, as the photons have greater than the 1.95eV work function, but the red will not, as it has less than 1.95eV/photon.

      Why did I select a 555nm green? That is about where the human eye is most sensitive. The green will look much brighter than the red, but the power will be the same, not due to the photon energy, but due to the photochemical mechanisms in human retina (rods peak sensitivity is a bit above 500nm, so at low intensities, green is perceived as much brighter. Red and green cones peak around 570nm and 530nm, with green cones being about one tenth the sensitivity of the red above 640nm, giving the same result at higher light intensities)

      Might I suggest some reading regarding HOW light and color are perceived: R L Gregory Concepts_and_Mechanisms_of_Perception is a classic, if dated.

  3. In my case, I can see the ‘purple’ laser pointer as a searing light, and can see the beam in the air, which most cannot. (They can see the spot on the wall of course but I’m talking about the little bit that is scattered sideways by dust in the air). The reason is that I had cataract surgery, and the artificial lens passes a little bit more towards the UV end than the natural lens.
    Black lights at discoteques are somewhat less interesting now since I now can see by black light pretty well.

    1. Interesting, have you tested yourself in total darkness with a true UV (no visible light) source to see if you really have a “super power”? You could get purple leotards and be UV Man!

      1. No I don’t have an safe truly invisible UV sources. I suspect that the perception might get just on the edge of truly invisible UV, but the photoreceptors possibly fall off by that point, and I don’t really know how far the lens goes other than ‘at least a bit further than a natural lens’. Also I’m hesitant to burn out what’s left of my retina on experiments, but ‘yolo’, and I do have two eyes after all.
        So I’m not at bumble bee level yet.
        As for super power I have thought a little about how to exploit it. Walking around the house at night under black light is fun, though not quite so impressive since many things have phosphors in them. But I can make out details and see shadows and read (non phosphored) printed objects just fine.
        It turns out that during WWII that folks that had cataracts were used in some cases for covert signaling, because they could see UV light flashes that others could not. So I need to brush up on my Morse. If curious about this you can search “wwii aphakic signalling” and there will be rabbit holes to persue.
        Your suggestion of purple leotards is inspirational and I need to look into that straight away irrespective of any latent super power. It is evocative of the old comic strip “The Phantom”. Coincidentally I am visiting Africa in a couple months, so a purple leotard may be de rigueur
        for my jungle adventures. The lack of pockets is a concern; I wonder if they make ‘cargo leotards’. So there’s a rabbit hole for me. Thanks!

    2. Yup. Cataract surgery rather dramatically changed my color perception, with blues and purples now seeming much stronger. I thought my wife had bought a new purple sweater, but she assured me that she’d had it fo years. It’s claimed that “cyanopsis” fades over time as the brain adjusts to the change in color balance, but it has been four months for me and the effect is still delightfully obvious—the cold blue light of winter looks amazing. I have some high-quality, well-filtered longwave UV flashlights, and they seem pretty bright to me now. But it’s hard to clearly remember what they looked like before, so I’m withholding claims of a new superpower. I do remember that after my great-grandmother had cataract surgery back in the ’60s, she commented that my faint (to me) fluorescent UV tube looked “beautiful”. Hmm… Maybe years of playing with all those UV lights (not to mention the MW and SW ones) was at least partially responsible for my cataracts.

      1. My last surgery was in 2012, so you’ll definitely still have the effect for years to come. I can understand what they’re saying about ‘the brain adjusting’, however I would assert that it is adjusting to the label you assign to what you are perceiving, and not that the perception is nullified. For example, black lights no longer look purple to me, they look more cyan. I don’t think that’s ever going to change. There still exists a perceptual purple without the UV component that does not look like black light purple which contains it, and makes it seem whiter.
        I hear you about the UV tubes and you may be on to something. I myself worked on bulk eprom erasers and I one time did burn the bejesus out of my eyes. Excruciating pain. As to whether that alone did it — probably not. Probably some genetic disposition. I began having trouble with cataracts when I was 34. I eventually got them done in my early 40’s.

    3. This is fascinating, I am much the opposite. pure blue light to me looks very much like ultraviolet. A christmas tree done up in blue LEDs looks no different to me than if was done up in UV LEDs, a perceptible glow on the diode but no cast light except as seen through interesting fluorescence caused by some surfaces. Blue-toned lights appear very bright at their source but cast very little usable light for me.

      The very interesting chromaticity diagram in that write-up is largely dominated by “grey” for me. Color is co cool

  4. psychology of your brain

    Nope. There is no ‘psychology’ of the brain. That would be physiology and neural physics and chemistry.

    Perhaps you meant psychology of the mind, which is a peusdo-science due to poor reproducibility.

  5. For converting a wavelength to RGB, I wrote a function for a SO answer (that no one appreciated ):
    https://stackoverflow.com/a/75727053/2138327

    As the OP shows, the question is as complicated as you want to make it, but a lot of the time I think folks will just want a drop-in approximation. This fn comes from measurements of daylight, but is compressed into a polynomial approximation which also gives smooth interpolation.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.