## Colors are weird, man

Post

### Re: Colors are weird, man

#46
I missed the colour discussion? Oh man.

We can fully map the way human eyes work using a three-dimensional chromaticity diagram where each axis is the stimulation of one of the three types of cones (sensitive to violet, green, and yellow respectively), the combination of different responses of cones producing different colours; this is the only "correct" way of presenting human-perceived colour - however, it's not intuitive, not useful for displays, and hard to perform mathematics on.

RGB is a cuboid (or rather, parallelepiped) section of this space, with axes arranged such that the maximum amount of human-perceived colour can be represented. The axes chosen represent the strength of light from three wavelengths - blue at ~440nm, green at ~510nm, and red at ~645nm (RGB doesn't actually specify these values). This has the advantage of making (0,0,0) be black, and (1,1,1) be white, as well as having the mean of all three values be a decent approximation at the luminosity of the colour. It also means that you can represent a wide array of colours with just three different wavelengths.

CMY is merely an inversion of RGB; it describes the absorption of such wavelengths rather than the emission, and is used in printing because it's how ink works.

RGB/CMY are not particularly useful as far as selecting a colour goes, though. Yes, they represent luminosity fairly well, but how does (1,0.8,0) relate to (0.6,0.2,0)? Clearly the latter is darker, but is it a darker shade of the same colour? (The answer is no; the former is yellow with a very slight orange colour, whereas the latter is a reddish brown.)

HSL/HSV are useful for this, as it represents the way we generally think of colour. HSL is a double-cone model that puts black at 0 lightness, white at 1 lightness, and the pure hues at 0.5 lightness; at 0 saturation, HSL produces shades of grey from black to white, whereas at 1 saturation it produces the strongest colour available at that lightness (which is black or white at 0 or 1 lightness respectively).

HSV is slightly different, in that it's a single-cone model that puts black at 0 value, and pure hues and white at 1 value; at 0 saturation, HSV produces shades of grey from black to white, whereas at 1 saturation it produces the strongest colour available at that value (which is black at 0 lightness, but a full colour at 1 lightness).

These two are similar but different; however, in either case, you can see the relationship between colours. In both cases, hue is represented as an angle, with red at 0 degrees, green at 120 degrees, and blue at 240 degrees. You can tell quite easily in HSL that (180,0.75,0.5) is a vibrant cyan with a slight grey tone, and that (270,1,0.2) is a deep violet, and can compare each aspect directly (in addition to the difference in hue, the former is less saturated but brighter than the latter). With the HSL model, you can find complementary colours simply by adding/subtracting 180 degrees to the hue, and you can find different shades and tints of the same colour by adding/subtracting to the luminosity.

However, they're funadmentally flawed in a number of ways. Firstly, they're both transformations of RGB, so it still suffers the problem that it doesn't represent all of human colour perception. Secondly, they don't deal well with colours that are near-white (in HSL, Alice Blue has the same saturation as Azure, despite one clearly being more saturated than the other; in HSV, pure hues have the same value as white, despite white obviously being brighter).

Finally, we have CIELAB and related colour models, which represent the way colour is interpreted by the brain. It's incredibly unintuitive, but it's a simple three-value model that captures a good deal more of the human colour gamut than RGB does. It uses lightness in a similar way to HSL, but uses its other two dimensions for magenta-green and yellow-blue. And this can also be represented in a double-cone model like HSL, each value having a similar representation, with the equivalents of saturation and luminance corresponding more accurately to their expected values. This is the middle ground between "simple" and "computationally expensive", and is probably the best colour model to use to represent human colour perception.

You'll notice that throughout I've referred to "human colour perception". That's because you'd have to adjust the values significantly for other trichromate-sighted beings, and throw them all out of the window entirely and start from scratch for anyone with four or more colour cones.
Games I like, in order of how much I like them. (Now permanent and updated regularly!)
Post

### Re: Colors are weird, man

#48
Talvieno wrote:That's a wonderful video. I didn't know that was even possible.
It's not - they don't actually "fix" colourblindness; colourblindness is typically the result of missing one of the three types of cones (typically the yellow or green for red-green colourblindness), and no amount of glasses will make you magically grow these cones back. What they do is adjust the wavelengths of incoming light, filtering out some specific wavelengths, in order to make red and green more distinct, allowing them to appear as two different colours. The colours he can see are still those shown on the chart; they're just arranged differently.
Games I like, in order of how much I like them. (Now permanent and updated regularly!)
Post

### Re: Colors are weird, man

#50
Duck, everything you said in your mega-post is absolutely true, as long as all you want to do is make a textual representation of the color.

The moment you want to replicate the color on a screen or on paper, it reverts to RGB/ CYM.
Until a screen or an ink is made that can work with the other color spaces, representing color as anything other than CYM/RGB is just extra calculation steps. :V

This isn't to say that these aren't useful systems, HSL/HSI for instance are very good for helping people select colors when they don't understand RGB.

With experience one can pick out what an RGB color looks like based on either the hex or the ratio. (I know, because I used to do this in web development classes and absolutely piss off the lecturer, who was trying to make a point about hex codes being hard to read. :V)

But people are more likely to intuitively pick up a HSL like system.
And nerds/scientists will always want a system that either represents wavelengths and intensities, or human perception of the color.

But in the end, when they print to paper it's CYM, and when they draw to screen it's RGB.

EDIT:: Also talvieno, totally not disappointing. It's a work around for color perception impairment (true color blindness can't be fixed short of new eyes. :3 And it can totally change peoples lives.
°˖◝(ಠ‸ಠ)◜˖°
Toba - A Development Dump
Post

### Re: Colors are weird, man

#51
Silverware wrote: This isn't to say that these aren't useful systems, HSL/HSI for instance are very good for helping people select colors when they don't understand RGB.

With experience one can pick out what an RGB color looks like based on either the hex or the ratio. (I know, because I used to do this in web development classes and absolutely piss off the lecturer, who was trying to make a point about hex codes being hard to read. :V)
I worked with RGB so far. Never used HSL/HSI I think. Now I can't even work with the HSL/HSI anymore.

It's not that hard. I kinda see the colour vaguely in my head when I see an RGB colour, needs a little more work for HEX, but normally you only need to look at the first of the two digits and it's already enough to give you an idea of the colour.

And I still piss off people when I tell them that I can count continuously to 31 on one hand, without just counting up to five with all fingers and starting over again. XD
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post

### Re: Colors are weird, man

#52
Silverware wrote:The moment you want to replicate the color on a screen or on paper, it reverts to RGB/ CYM.
Until a screen or an ink is made that can work with the other color spaces, representing color as anything other than CYM/RGB is just extra calculation steps. :V
As I said, it's because RGB allows you to represent colour using only three wavelengths of light. It's not a great system, but it's a simple and cheap one; there's nothing stopping a CIELAB screen from being developed, but it'd require four single wavelengths as well as a white light, which increases your cost by 40% before you even get into interpreting signals.
It's not that hard. I kinda see the colour vaguely in my head when I see an RGB colour, needs a little more work for HEX, but normally you only need to look at the first of the two digits and it's already enough to give you an idea of the colour.
Sure, but you have to convert the codes to the colour in your head to be able to compare them, and even then you wouldn't necessarily know.

Which of #1921FB and #C90FDA is more saturated? I can look at them and see the former is blue while the latter is magenta, but how can I tell which is more saturated?

It's a little more obvious when you compare them as (238, 0.97, 0.54) and (295, 0.87, 0.46) - now I can see directly that the former is more saturated, and a touch lighter too, as well as the hue telling me they're blue and magenta respectively.
Games I like, in order of how much I like them. (Now permanent and updated regularly!)
Post

### Re: Colors are weird, man

#53
JanB1 wrote:
BFett wrote:Personally, I am more of a dark green lover.
Did you choose that colour based on the colour of something else, or did you just use a color picker and think "yeah, this is nice"?
I used a color picker, why do you ask?
Post

### Re: Colors are weird, man

#54
BFett wrote:
JanB1 wrote:
BFett wrote:Personally, I am more of a dark green lover.
Did you choose that colour based on the colour of something else, or did you just use a color picker and think "yeah, this is nice"?
I used a color picker, why do you ask?
Thought so.

The colour code is all "messed up".
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post

### Re: Colors are weird, man

#55
DigitalDuck wrote: As I said, it's because RGB allows you to represent colour using only three wavelengths of light. It's not a great system, but it's a simple and cheap one; there's nothing stopping a CIELAB screen from being developed, but it'd require four single wavelengths as well as a white light, which increases your cost by 40% before you even get into interpreting signals.
well, humans in general only have three different "designed" wavelength detectors with wide response curves.
all other wavelenghts we see are just superpositions of red, green and blue signals.
so all you need to do is reproduce those responses in the RGB sensitive cells.
(plus whatever rods are sensitive to to reproduce their correct response as well, but i dont know how much their inputs matter in the dynamic range regimes current displays work at all)
Post

### Re: Colors are weird, man

#56
Cornflakes_91 wrote:well, humans in general only have three different "designed" wavelength detectors with wide response curves.
all other wavelenghts we see are just superpositions of red, green and blue signals.
so all you need to do is reproduce those responses in the RGB sensitive cells.
(plus whatever rods are sensitive to to reproduce their correct response as well, but i dont know how much their inputs matter in the dynamic range regimes current displays work at all)
Except the cones are not actually tuned to red, green, and blue; they're tuned to yellow, green, and violet, with wide ranges. We see red because the yellow receptors catch it at the very top of their range, and the green receptors miss it entirely. Reproducing those responses can't be done with only three wavelengths (especially not those tuned the same as our receptors) - you get a decently wide range of colours with RGB, but it's far from all those visible.

The only way to truly reproduce human vision on a screen would be to have light sources at every visible wavelength - this isn't really doable, so you make approximations. CIELAB approximates it by not only taking the colours each receptor is sensitive to, but also the colours they're not sensitive to - creating pairs of violet-green (two receptors), and yellow-blue (the third receptor), as well as luminosity. This covers a wider range of visible colours than RGB, but would require five colour signals instead of three, making it more impractical for use in screens etc. (and again, that's before we even get into the software side).
Games I like, in order of how much I like them. (Now permanent and updated regularly!)
Post

### Re: Colors are weird, man

#57
Or in Corn-terms:
you can't reproduce it with just three wavelengths, because our response functions per wavelength overlap a great deal for the 'green' and 'red' cone.
The LT IRC / Alternate link || The REKT Wiki || PUDDING
Post

### Re: Colors are weird, man

#58
but its still just a 3 dimensi.... oh... derp... now i see.
better get some tunable "LED"s designed then
Post

### Re: Colors are weird, man

#59
some reference pics
"A sufficiently advanced technology is indistinguishable from magic."
- Arthur C. Clarke

### Online Now

Users browsing this forum: Syndicrat and 1 guest