Live data from Hacker News

Color: From Hex codes to Eyeballs

jamie-wong.com

41–50 of 55 posts

Re: Color: From Hex codes to Eyeballs

#41
post #31

A couple of years ago, I built an app that would generate websites from photographs. The idea was if you liked a particular scenery/color combination from the real world, then you'd have a website built from it. All you had to do was a take a photo and it'd generate a color palette from which the website would be built on the fly. However, I faced with the same challenge as the author has pointed out - what our eyes…

Could you please give me a link to your github account?(assuming that's where you'll put the source)

I've been wanting to do this for a while but figured out that I lack the knowledge and time to do it properly

Re: Color: From Hex codes to Eyeballs

#42
post #20

Earlier quoted context omitted.

> 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 g…

> An analogy of filling a curved-bottom tub would be a better fit

No, it would not. That rationalizes your concept of trying to match the input distribution with the response function, but it is specious and incorrect to apply it to a response function. Filling a tub with liquid allows liquid in one place to move to another place. Light doesn't work that way, light at 550nm doesn't spill over to 600nm. The incoming light at 550nm is completely accounted for in the output response, and doesn't affect the response at 500nm or 600nm, and isn't affected by input at 500nm or 600nm.

The response function is literally an efficiency curve. If you want maximum efficiency or maximum output, you give it inputs that land at the apex of the efficiency curve.

> I would also suspect that the receptors are becoming less and less sensitive to the stimuli they accept as they get closer to saturation

That is correct, but outside the bounds of what this article is discussing. For all practical normal daylight situations, which the range of all monitors lands inside, response is roughly logarithmic (or linear on a log scale). Clamping or saturation in the response happens in extreme darkness and extreme brightness. Response to the night sky in between stars, or to staring directly at the sun have a non-log. Response to computer monitors and almost everything you see during the day is linear on a log scale.

> If that really is the case, then a LF really would be better off if it was more bell-shaped

It's extremely unlikely that there's any real-world scenario under which this is true. But if you want to do this thought experiment, then you need to account for the receptors saturating. If you push the receptors to saturation, then their entire response goes flat, changing the overall shape of the response function. By matching the shape of the response function and then saturating, you force your target to move, and then get the wrong answer anyway.

If you push one receptor to saturation, the next best answer would be to put the remaining portion of your power distribution at the apex of response sensitivity for the other two receptors, so you'd have three specific wavelengths, but not a bell shape.

Here's an deeper discussion of human visual response that includes cases of extreme ranges and saturation: http://www.telescope-optics.net/eye_intensity_response.htm

Look specifically at figure 242. Monitor level brightness response is very near the center-line (vertically) in the chart. All normal daylight conditions are represented between the "cone threshold" (0.001mL) and "discomfort" (100,000mL) marks vertically. You will note that no response clamping occurs between these values.

Re: Color: From Hex codes to Eyeballs

#43
post #38

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…

As a "colorblind" person, this is a bit frustrating so bear with me. Few people are literally "colorblind". You don't have one cone cell of each type, you have loads of them. Colorblind people generally have fewer of them (or some of them are shifted) but usually only for one type (usually red/green). The "red" and "green" cones overlap quite a lot[1] and they also overlap with the rods. This means that even if you l…

> Physically isolating certain wavelengths produces a "pure green" light.

What, can we get an wavelength-energy distribution that looks like a Dirac delta?

There are discontinuities in physics but you kinda need to be careful to see if what you think is a discontinuity is one.

Re: Color: From Hex codes to Eyeballs

#44
post #31

A couple of years ago, I built an app that would generate websites from photographs. The idea was if you liked a particular scenery/color combination from the real world, then you'd have a website built from it. All you had to do was a take a photo and it'd generate a color palette from which the website would be built on the fly. However, I faced with the same challenge as the author has pointed out - what our eyes…

Replying to keep track and or follow your github when/if you post this.

Re: Color: From Hex codes to Eyeballs

#45
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…

I apologize for my ignorance of the specifics of color blindness, I don't suffer from it myself. I've just been so fascinated by the concept of these glasses that I can't help sharing.

Re: Color: From Hex codes to Eyeballs

#46

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…

Agreed, it's a lot of different sources of information. Color perception and reproduction are deep subjects and many of the results/assumptions are in turn subjective (e.g. dependent on the person). However, this is a lot better than most of the simple presentations I've seen on-line.

One of the noticeable gaps in the article was a discussion of white-point or color temperature even though it starts to discuss illumination. It's critical to realize that our perception of color is influenced by the surroundings and relative to what we accept as white. That's part of why when you're out in the snow with rose glasses on things start to look normal, until you take them off... also why people argue about the blue-black or gold-white dress.

Re: Color: From Hex codes to Eyeballs

#48
post #7

How can an image properly illustrate (in RGB) what colors are outside of the RGB gamut? That image must be inaccurate? Should I assume the image is technically incorrect but a good illustration of what the RGB gamut does look like?

Your computer monitor works within the sRGB (or comparable) color space, so it physically cannot render colors outside of that color space. When you look at that diagram you're seeing a representation, not the real deal.

Pigments could theoretically do a better job than pixels. But those would have to be some very good pigment$. I'm not sure if there is a printer that can produce this in practice. Your cheap inkjet printer definitely won't. The most expensive printers haven't been designed to cover the full human visual spectrum either, out of technical limitations, or cost limitations. And even when you have the pigments on print, the light $ource would have to contain the entire visible spectrum at high intensity (basically you'd need a very bright white light, as bright as the sun). And then the surface cannot have any glare. etc. So not very practical to achieve.

Re: Color: From Hex codes to Eyeballs

#49
post #45

Earlier quoted context omitted.

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…

I apologize for my ignorance of the specifics of color blindness, I don't suffer from it myself. I've just been so fascinated by the concept of these glasses that I can't help sharing.

There is also a very large range of responses to the EnChroma glasses. I've seen or heard about plenty of intense reactions to them, but my personal experience has not reflected that.

My brother-in-law and I are both colorblind (mine is not as severe as his) and he bought a pair a few years ago. He enjoys the difference but not enough to wear them consistently, and they had a barely perceptible effect on my own vision, just giving green a bit more "pop".

I think the main issue is that it's easy to group all colorblindness together even though "huh, I guess my shirt really is purple" is very different from "I look at streetlight positions, not colors."

That said, even my mild colorblindness puts me at a massive disadvantage on certain Halo maps or against certain team colors. In situations like that, I might as well be fully colorblind asI end up having to play based on movement alone.

Re: Color: From Hex codes to Eyeballs

#50
post #38

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…

As a "colorblind" person, this is a bit frustrating so bear with me. Few people are literally "colorblind". You don't have one cone cell of each type, you have loads of them. Colorblind people generally have fewer of them (or some of them are shifted) but usually only for one type (usually red/green). The "red" and "green" cones overlap quite a lot[1] and they also overlap with the rods. This means that even if you l…

The genes for L and M cones are on the X chromosome and there are some variants for each type, or sometimes one is missing. This mostly affects men, since they have only one X chromosome, so if the gene for e.g. the L cones is missing then they end up as dichromate or if they get two variants which overlap too much there isn't much differential signal. A small number of women end up as tetrachromats because they have e.g. 2 types of L cones with slightly different spectral sensitivity, one from each of their X chromosomes. It's still not clear as far as I know whether such women see a dramatically wider range of colors, or whether it's more of a slight advantage in discriminating some near-looking colors which appear identical to other viewers. Human tetrachromacy is rare and hasn't been studied too deeply from what I've seen.
Post reply on HN