Live data from Hacker News

Color: From Hex codes to Eyeballs

jamie-wong.com

21–30 of 55 posts

Re: Color: From Hex codes to Eyeballs

#21
post #5

I write firmware for theater/TV LED lights. I have a spectrometer on my desk. This is the guide I wish I had to get started with! It’s amazing!

Here's another trove of information about color, if anyone finds it useful:

http://www.handprint.com/LS/CVS/color.html

Re: Color: From Hex codes to Eyeballs

#22

I've been trying to build my own mental model that's easy to visualize how your eyes build color. Imagine 3 people (r,g,b) standing across from each other playing a 3 way tug of war with a bowling ball in the center. They each can feed on certain ranges of radiation to help them pull the ball towards them, color is determined by where the ball ends up. If red and green pull equally the ball moves sideways out of the…

There are multiple levels of processing here, so this pure trichromatic model turns out to be a somewhat misleading mental model to fix on. The signals from three types of cone cells are processed immediately within the eye into 3 different signals, a lightness response (L + M), a yellow-blue response (L + M – S), and a red-green response (L – M), before those combined signals go through further processing. LMS signals per se don't get sent anywhere further up the chain. If you are red-green colorblind that means you aren't getting much if any useful signal from the L – M response, either because your 'L' and 'M' cones are too close together to meaningfully distinguish, or because you are missing one of the two entirely.

[Calling the LMS cone types Short = 'blue', Medium = 'green', and Long = 'red' creates a lot of confusion. Stick to long/medium/short labels. A statement like 'there is no such thing as pure green' is nonsensical. As Newton figured out, light rays themselves are not colored; color is a higher-level percept constructed in the human brain. Green is no more or less 'pure' than blue or orange or purple.

For that matter calling the RGB primaries 'red', 'green', and 'blue' causes some confusion also, as these primaries are seen as an orangish red, a yellowish green, and a purplish blue, nowhere near the 'unique hues' red, green, or blue. E.g. the use of these names in named CSS colors, etc. is a horrible human interface.]

If you are interested in the details, this is one of the better sources online http://handprint.com/HP/WCL/color2.html [I would refer you to books but those are hard to accessibly hyperlink].

As for rods, their response is pretty much ignored during the day. They are much more sensitive, so start kicking in when the visual system adapts to very low levels of light where the cone cells aren't getting much useful signal.

The article under discussion in this thread is full of technicalities, and in a brief skim I didn't notice any obvious errors, but it ignores several of the most important high-level features of human color perception – and gets a bit confused about the relationship between color reproduction via additive RGB displays, color measurement by instruments, and models of human vision – and therefore isn't the most useful resource for someone new to the subject, IMO.

Re: Color: From Hex codes to Eyeballs

#23
Interesting tidbit about color blindness: it's often caused by the response of the eye's M and L cones being too close together. There's a company that makes glasses that put a notch in the frequency response between the two to produce a more pronounced difference, allowing R-G color-blind individuals to differentiate red and green for the first time.

http://enchroma.com/

Re: Color: From Hex codes to Eyeballs

#24
post #17

On a similar vein, I've used http://www.huevaluechroma.com/ extensively for learning about color theory. It's incredibly comprehensive and tailored for practical application (painting, more specifically).

That one is a much better source to start with, IMO.

Re: Color: From Hex codes to Eyeballs

#25

I have been working on a video game with a puzzle mechanic involving mixing paint to create trails in a racetrack, and I have learned a lot about the intuition gaps in light/color physics theory while testing with people. I was going to make a post about it but this is an even more in-depth exploration of the whole thing from the bottom up. I will be referencing this on our game site when it's up!

Could you elaborate on the intuition gaps that people have? I have a pretty good understanding of color theory and the physics/biology behind it, but I have no knowledge on the pedagogy of it. Hence learning about the more common false beliefs sounds fascinating.

Mainly, the concept of subtractive mixing.

Paint (or pigment) works by absorbing a portion of the visible spectrum and reflecting the rest. What you see is what is reflected. When you mix pigments, both portions of the spectrum are absorbed, and a smaller resultant portion is reflected.

We mostly think of color in terms of light, and mixing colors of light which is often the opposite (light: "all colors mixed is white" as opposed to paint: "all paints mixed is black"). Our game uses paint as the underlying physics concept rather than light.

Adding cyan to magenta gives blue when you're talking about pigments. Even in the case a player understood the theory of light and pigments, when playing a game you need to reflexively tap your intuition to understand what happens when a change is affected: "When I add/remove X color to Y what do I get?" Additionally, players weren't used to CMY as the primaries and always thought in terms of RGB.

Because our game is a real-time (racing-based) puzzle game, we had to do many iterations on our game UI to help players answer this question much faster while also navigating the level.

From our game design standpoint, this was the major intuition gap we encountered.

Re: Color: From Hex codes to Eyeballs

#26
There is a very interesting subgroup in 3D rendering that uses wavelengths for calculations instead of the RGB-model.

This is called spectral rendering (other names are used).

Some even use wavelenths outside the visible range and calculate the interaction between different wavelengths.

Most of those renderers are experimental but it's worth looking at them if you like this subject.

Re: Color: From Hex codes to Eyeballs

#27

I've been trying to build my own mental model that's easy to visualize how your eyes build color. Imagine 3 people (r,g,b) standing across from each other playing a 3 way tug of war with a bowling ball in the center. They each can feed on certain ranges of radiation to help them pull the ball towards them, color is determined by where the ball ends up. If red and green pull equally the ball moves sideways out of the…

There are multiple levels of processing here, so this pure trichromatic model turns out to be a somewhat misleading mental model to fix on. The signals from three types of cone cells are processed immediately within the eye into 3 different signals, a lightness response (L + M), a yellow-blue response (L + M – S), and a red-green response (L – M), before those combined signals go through further processing. LMS signa…

Which book(s) would you recommend?

Re: Color: From Hex codes to Eyeballs

#28
post #23

Interesting tidbit about color blindness: it's often caused by the response of the eye's M and L cones being too close together. There's a company that makes glasses that put a notch in the frequency response between the two to produce a more pronounced difference, allowing R-G color-blind individuals to differentiate red and green for the first time. http://enchroma.com/

Deuteranomaly and protanomaly -- the most common conditions referred to as "red-green colorblindness", and which involve variant forms of light-sensitive pigment in one set of cones -- do not involve inability to distinguish red from green.

Deuteranomaly causes difficulty distinguishing between shades where the precise amount of green is relevant (i.e., to a deuteranomalous person, pure yellow -- equal parts red and green -- would still look slightly reddish-orangish).

Protanomaly causes a similar effect with red, and also dims the dark/deep red part of the spectrum slightly.

If someone doesn't want to use the medical terms for them, better names are "green weakness" and "red weakness" since they don't carry the misleading "can't tell red and green apart" connotation.

Re: Color: From Hex codes to Eyeballs

#29
post #20

The part where he takes the human sensitivity into account has grabbed my attention. It looks a little suspicious to me the way he simply just multiplies the normalized relative sensitivity measure with the spectral fluxes. The way it is calculated now, the only way for a spectral flux (SLF) to be optimal considering its spectral luminous flux (LF) is to be entirely concentrated at ~550nm, laser-like. However, such a…

> It looks a little suspicious to me the way he simply just multiplies the normalized relative sensitivity measure with the spectral fluxes. What is suspicious about it? This is how all response functions work mathematically, both for humans and animals, as well as for mechanical sensors. The response function is the measured ratio of the input value to the output response (for a given wavelength in this case, but it…

An analogy of filling a curved-bottom tub would be a better fit than of someone making bets optimally when the chances are non-uniform. Our cones can be stimulated only up to some certain amount. At the point of saturation, any further stimuli would have no effect, other than perhaps frying the receptors.

I would also suspect that the receptors are becoming less and less sensitive to the stimuli they accept as they get closer to saturation, making the relation non-linear, and shaped more like a saturation curve.

If that really is the case, then a LF really would be better off if it was more bell-shaped and wide as the relative human sensitivity, than being an impulsive one at the peak. It would be like that because as the LF starts doubling down on the highest bid (~550nm), the marginal response other wavelengths would start becoming more viable, eventually taking 550nm off the first place.

There also is the possibility that the author has done his research well before spending so much effort on preparing the article. Even then, this could be the reality that we are yet to discover.

Re: Color: From Hex codes to Eyeballs

#30
One interesting facet of all this is that afaik most of our hyper-realistic "physically based rendering" 3D renderers are still based on these color models instead of modeling the light spectrally. I imagine that somewhere in near future that will change as we start reaching the limits of the color models.

It is actually interesting how well simple RGB has served in practice when it is fairly simple to imagine scenes where it really shouldn't (and wouldn't) work at all.

Post reply on HN