Determining Color Difference Using the CIELAB Model? 206
Colour Blind asks: "I am working for a not-for-profit organization developing a website for kids. I am attempting to develop a method for testing if two colours (as defined by R, G, and B values [0-255]) are adequately different to be visible on top of each other. So far I have tried many things but this is the one that, by all accounts, should work: I have converted from RGB to (CIE)XYZ using a 3x3 matrix transformation. From here I have used three more equations to convert to CIELAB colour. I have then calculated the distance between the two colours in question in CIELAB colour space. The results are not correct: there are pairs of colours that are quite far from visible that yield the same difference as colours that are plainly acceptable for visibility. Any suggestions?"
difficult problem with much research (Score:2, Informative)
Re:difficult problem with much research (Score:5, Informative)
This is a complex problem and I think a lot of the answers I'm reading on this topic center around a misconception on a lot of people's part about the difference in luminance perception and chrominance perception. The key issue is:
The eye is most sensitive to luminance changes in GREEN.
The eye is most sensitive to chrominance changes in BLUE.
Thus if you are trying to determine at what point the eye will say "hey there is a block of a different color on top of that one", blue is going to be an important part of your color model since while your eye isn't so good at picking up how bright a blue is, it is very sensitive to the relative shade around the blue wavelength something is.
So if you are trying to do a 3-space transform and distance and finding that colors which are linearly close to each other in CIELAB space are perceptually very different, it is very likely because it is a color in a space where the human eye is more perceptually sensitive. You are going to get "dead areas" of the model where the eye is not so good at viewing differences, and active areas where in a small space there seem to be quite a few different colors because the eye is perceptually sensitive in that area.
This is the reason you see odd patterns in color changes in a rainbow. You are seeing the relative sensitivities of your eye to pick up colors. Color perception is decidely non-linear and doesn't even fit a nice equation.
For those who don't know the basics: (Score:3, Informative)
In other words, if your data isn't lining up, the fundamental problem is that the response of individuals' eyes are rarely comparable. Then again, there's all kinds of psycho-visual effects that can screw up this kind of research without even taking this into account.
Sorry you chose to pick such an incredibly complex subject to research, but good luck in your results!
~Loren
Re:difficult problem with much research (Score:2)
But over long distances it is an integral of all these small "about equal" values and that adds up to a very large variation in perceived distance, so it is not perceptually uniform for long distances.
In fact I suspect that such a perceptually uniform space could not be represented in three dimensions.
A better approach may be to take XYZ (which I think does represent the response of the cones in the human eye) and do a lot of math on the two XYZ sets to deliver an "amount different" value. Don't think about spaces, your goal is to produce this single number, losing the actual colors.
Color Blind! (Score:1, Interesting)
I went to the doctor only to find out I was color blind and that explained why I could only see three colors on a rainbow. It's sad, I know, but true.
Color blindness (Score:1)
Color Blind Test (Score:1)
The test is for certian types of color blindness.
Perhaps somebody know the name of the test and you may fine it helpfull.
Re:Color Blind Test (Score:1)
Although I think it's highly questionable as to how accurate this could possibly be using uncalibrated computer monitors...
Ask /.? (Score:2, Insightful)
Well, step 1 ... (Score:1, Informative)
Re:Well, step 1 ... (Score:1, Funny)
Step 3... profit.
Re:Well, step 1 ... (Score:1)
Read this relevant document (Score:5, Informative)
Limitations of Colour Management [uwaterloo.ca].
Perceptually equal color spaces (Score:5, Insightful)
In addition, it sounds like you're hoping to test whether things are sufficiently perceptually different on people's monitors. The sad news is that the variation between different monitors, between LCDs and CRTs, between different brightness and contrast settings, between different phosphor technologies, differences in how long the monitor has been warmed up, and differences in the aging of the phosphors mean that no two monitors will actually produce the same color from the same R, G and B equivalents, and you'll get different distinguishabilities for different colors on different monitors.
As a nature photographer, I have to jump through hoops, including hardware sensors for detecting the output of my monitor, to get anything like reproducable color out of my own equipment. It's just a difficult problem, I'm afraid.
Re:Perceptually equal color spaces (addition) (Score:2, Insightful)
Re:Perceptually equal color spaces (addition) (Score:2)
Even in 1990 when I got my first PC clone, it was yellow text time!
GTRacer
- I need an Apple ][ video cable...
Many possibilities (Score:3, Interesting)
That said, both of these colour spaces are really only approximations, and I think they'll be weighted towards uniformity in pure colours. Maybe a colour that pulls from a wider range of the spectrum like orange or gold might be smaller than the green or blue areas. I'm going to try and generate some test images to verify this either way.
Damn the monitor, shift to R Theta color wheel. (Score:3, Interesting)
Try using the color sum, R+B+G for radius and the ratio of colors for angle. The outside would be white, the center black and a mean radius would have R+B+G = 256 and so contain the pure colors. Limits of acceptable difference could be set to accomodate for any crappy old monitor.
If no one else has come up with this rather obvious aproach to digital color, I hearby delcare first art and grant anyone and everyone the right to use this basic IDEA without further consultation. You'll have to do some work to make that idea practical, but the basic idea seems to have been working for designers, graphic artists, archetects and plain old painters for a long time.
Re:Damn the monitor, shift to R Theta color wheel. (Score:2, Insightful)
Re:Perceptually equal color spaces (Score:1)
[Also, it seems I'm not the only one who has problems distinguishing indigo in a rainbow [paton.net].]
MacAdam Discrimination Ellipses (Score:3, Informative)
You can try to work these ellipses into your formulae, and people like Parra in France and Parry Moon in Camridge (MA) had tried to distort these color ellipses back into circles in trying to find a transform of these color spaces into a perceptually uniform color space. But the key thing is that the monitors will differ, the monitors' settings will differ, (the phosphors don't really differ that much between CRTs, but the primaries for CRTs are very different from that of LCDs and that of projectors using LCDs or DLP/DMDs), and most importantly the viewers' photopigments will also differ. Along with the well known ~10% of males that are dichromats, a large number of the population are anomalous trichromats. The actual numbers are still being tallied, and it is still in a very conjectural stage whether most people have multiple copies of the L-opsin gene or multiple copies of the M-opsin gene. The Nathans are on one side of this and the Neitzes are on the other side of this. Which is which, I keep forgetting.
But a quick summary is:
the majority of human subjects are most sensitive to changes in the red (+L-M) or green direction (-L+M), with changes of 0.3% being perceptible for targets of 2-10 degrees in size, mediumly sensitive to changes in intensity (+L+M[+ maybe S]) {there are HUGE arguments and PhD theses brewing over this} for brighter and -L-M[ - maybe S] for darker), and least sensitive to changes that affect the S-cones (+S, kind of a violet change, -S, kind of a greeny-chartreuse change). This, along with the MacAdam Discrimination Ellipse, are for a target color being compared to the immediately adjacent surround color. This does not hold true for nonadjacent and distant targets being compared or for targets subtending visual angles much larger than 5 degrees or much less than 1-2 degrees. There are some funky changes that occur when you get to targets of less than 1/2 degrees in size and when you start to talk about colors that you don't look at foveally or centrally.
That may answer your question. And it may even lead you towards a workable plan on equi-perceptual space. (work with CIE xyz and integrate MacAdams' discrimination data). But realize that MacAdams' work, like much of visual psychophysics is based on less than 5 (count 'em five) subjects. Most visual psychophysics papers today usually have the authors and their post-doc slaves as the only subjects. But actually coming up with that will take data collection on the scale of a PhD thesis, and working within the CIE color space, even from 1931, is probably close enough for most work, even if some of your side-by-side colors are twice as far in color space than they need to be at minimum.
Try the Value in HSV instead (Score:4, Interesting)
I think the key in picking colours for any website is that they have have a difference of at least X in brightness (the V in Hue-Saturation-Value unless I'm sadly mistaken - I'm not an expert in this area), where you should be able to determine X experimentally. Any decent color picker (such as those in Gimp or Photoshop) will allow you to jump between RGB or HSV. The reason I think this is the way to go is that a decently large percentage of the population (at any age) is colour blind, so while you or I may easily be able to see the difference between a blue and green, or a green and red, at the same brightness, some people (particularly males), just can't.
That should take care of you for making the site usable. At that point, the choice of which light or dark colors you use for what becomes purely stylistic (again, I'm just a stupid computer scientist - I'm sure someone with a stronger HUI, marketing, or fine arts background might have a stronger opinion on what colors are used for what).
-"Zow"
Re:Try the Value in HSV instead (Score:3, Interesting)
The HSL colour space isn't a very good mapping, though. Things like CIE are better representations of how we really see things.
Re:Try the Value in HSV instead (Score:2, Interesting)
Take the H, S, and V values of both colors. Then calculate a difference for each of them like: |h2 - h1| and |s2-s1| and |v2-v1|
Use Hue so that the min-value and max-value are the same (effectively to create a circle and find the smaller arc between the points on in) Then do something like dH*dS*dV possibly with some constant weights and the result shoul should be larger when the difference is larger.
For this to give useful numbers H, S and V should probably be a float between 0 and 1.
Re:Try the Value in HSV instead (Score:5, Interesting)
Re:Try the Value in HSV instead (Score:1)
If you have given color, it will map to an absolute value in either color space scheme. That value will be different, of course, but should be consistently repeatable.
Re:Try the Value in HSV instead (Score:1, Interesting)
Or try the L in LAB (Score:3, Informative)
If you are already converting to CIELAB, try using the L component alone, not the full Delta E. That yields very good results. Probably color-blind people will have less problems with the generated colors, too, since this is about perceived brightness, not hue (but I'm not too sure about this).
I just made a quick Perl hack to test this. It generates 500 pairs of random colors, and outputs them sorted by "distance". It does so converting to LAB and then computing "distance" as abs(L1-L2). Check the output here [et.com.mx], mail me if you want the script.
Re:Try the Value in HSV instead (Score:2)
The key to picking colors for a website is LOOKING AT THEM
Re:Try the Value in HSV instead (Score:2)
While your reply seems intuitive, my point was that what you and I perceive when we look at the screen is not necessarily what someone else, whose vision is not quite as acute as ours, may see. In my first job out of school I worked with this one guy who is one of the best developers I've ever known, and he was legally blind. It was really insightful to take something to him asking, "What do you think of this (UI) design?" and have the response be something along the lines of, "It's all a blur. Is there any way to zoom in, or separate the elements?" That sort of thing just hadn't occured to me. I won't say that I consider it for everything these days (I've chosen the colours on my personal website more for effect than accessability), but if I've got something professional to put out the door, I certainly do what I can.
-"Zow"
Think this through... (Score:2, Interesting)
Also, you have not demonstrated a need for such an evaluation function to exist. Is this because the site designers have a problem being able to choose readable colors? Perhaps if these people cannot select a good color scheme, you need new designers.
it uses polar coordinates? (Score:1)
if i remember correctly, L is basically the brightness, while a and b go from green to red and yellow to blue (i'm not sure about the directions, though).
oh, and such a tool would be useful. not only fr designers, i imagine it could be used for compression as well. maybe he should ask the codec guys, they should know a way to determine if two colors are distinguishable from another.
Re:Think this through... (Score:2)
It depends on the difference and how it's approach (Score:2, Interesting)
Your ability to tell the difference between two colors (or light intensities to bring back the classic experiments) depends on how you approach the limit of perception (or differentiation in this case). Classically, if you start where you can not perceive a difference between to intensities, and increase the difference, your threshold for difference will be lower than had you started when you could tell the difference between the two intensities and gradually decreased this difference. It seems that color differences should follow the same rules as light intensities. Also keep in mind that we're more sensitive to differences in shades of blue, IIRC, due to overlaps in the sensitivity ranges of long, medium and short cones. So, these are probably among the causes for you observations.
Land's Two Color visual perception work (Score:4, Interesting)
The important things are our visual expectations, as well as the relative intensity of parts of the scene. I can remember a demo from Land where two projectors sufficed to give a full color scene. If part of the image was abstracted, it appeared to be black and white ! This implies that a combination of two colors can, under certain circumstances, appear to be the same as a different combination of three colors. I would suspect that this effect would have to be considered in the vision tests described in the original posts.
A Michigan State U. [35.8.247.219] report on the Land work is available, as is a lot of more recent work, such as this paper [nec.com] by Kobus Barnard.
Re:Land's Two Color visual perception work (Score:2, Interesting)
This is also how 2-chip DLP [dlp.com] works. 1-chip DLP uses a color wheel containing RGB, and alterately projects an image of each color, the chip is, in essence, the black and white sample. 2-chip DLP uses a cyan filter on one of the projector's chips, and a red filter on the other, in effect, reproducing Land's experiment! 3-chip DLP uses a chip for each of RGB.
Complex issue (Score:3, Interesting)
What sort of monitor are you using? Have you correctly callibrated the display? What software are you using to display the colors? How does this software deal with display gamma? Other important details include the brightness of the surrounding environment, other windows and such on the screen which can distract the eye and interfere with your visual processing of the colors.
If you haven't already read the books and web pages by Charles Poynton [http], they cover all the details. Color issues always seem simple, but actually this is an extremely complex and subtle issue. Also, people's ability to visually distinguish color varies quite a bit. A surprisingly large percentage of the population is color blind to at least some portion of the spectrum. Also, display devices vary widely in their ability to correctly display different colors.
Anyway, to sum it all up, I'd be really surprised if you can use any sort of theory to predict whether you can visually distinguish between different colors. Even with correctly callibrated equipment, and experienced researchers, I doubt that your problem is easily answered!
Best of luck,
Daniel Wexler
www.flarg.com [flarg.com]
Color blindness (Score:3, Informative)
See http://www.visibone.com/colorblind/ for useful color information specific to web-site design.
Re:Color blindness (Score:1)
For those too lazy to click the link, tetrachromats are woman who see in RYGB(instead of RGB like most of us). They have a fourth type of sensor in their retina that has a peak sensitivity to wavelengths of light that are in-between red and green(aka yellow). This means while we can't tell the difference between a piece of paper lit by a light that has a yellow filter in front of it and light that is a combo of a red light and green light, they can tell the difference.
Re:Color blindness (Score:4, Interesting)
The advantage that hyperdimensional color perception has over traditional trichromacy it a better ability to discriminate hues or different colors. Therefore a tetrachromat could be considered to be at a certain advantage when it comes to color discrimination. This obviously has not been important to our evolution but it is for some species as birds and turtles see a world we can only imagine with some birds seeing from ultraviolet into the visible spectrum and turtles seeing a world rich with color. For instance, if you were to imagine a turtle sitting in a pond with the water as still as glass and the sun setting on the horizon making everything (the sky, land and water) red and orange and yellow, the turtle sitting in the water would be able to pick out a frog sitting on a log with discrimination that we could never hope to approach.
Human tetrachromats (possibly) found (Score:1)
Re:Color blindness (Score:2)
Re:Color blindness (Score:2)
True, but up till just recently, evolution had nothing to do with RGB monitors and TV. And if they do end up having an influence on evolution I am sure that TV influence would not be for the better. Besides, there is a world outside of the RGB gun. Yes?
Seriously though, RGB monitors and the technology that they use is pushing 80 years old. Adaptive technologies and composite individual pixels will make these issues less of a problem.
Re:Color blindness (Score:2)
Not been reading slashdot very long (Score:2)
Re:Not been reading slashdot very long (Score:2)
Actually yes, if you would have taken the time to see my user # 18351, it indicates that I have been here for a while. However, I do step away from my screens for short periods of time, so perhaps I missed that one.
Thanks
Re:Regarding tetrachromacy (Score:2)
I used hyperdimensional in the mathematical sense for a reason. In that typically we regard any thing higher than three space as hyperdimensional. For instance, there are organisms that see in five to seven space and one could appreciate that it would be possible to deconvolve their respective individual perception spaces into readily separable and quantifiable dimensions of analysis.
Re:Color blindness (Score:1)
Not a chance... (Score:2)
Then you've got the fact that not only does everyone perceive colour in a different way, but some people are colour-blind! I myself am unable to distinguish between the standard yellow & green used in 4-colour mode on the BBC Micro from so long ago - the last census stats I saw indicated that 8% of the population have some form of colour-blindness.
I think you really need to re-think your web-site design - after all, what's wrong with black on white?
Re:Not a chance... (Score:2)
16 colour mode may have been the same, but in the games I remember playing in 4-colour mode, the difference between yellow and green was the only time it made a... difference.
Some useful links... (Score:5, Informative)
Re:Some useful links... (Score:2)
This [tiscali.nl] is an excellent introduction to colours on computers, complete with (working) algorithms for conversion.
There are some subtle aspects (Score:3, Informative)
Porison and Wandrell adapted CIELAB color models to account for the quirks of monitors. You need to have information on how far away people sit from the monitor, the resolution, the size, etc., but it's actually quite good. Here's a MATLAB implementation by Zhang at Stanford [stanford.edu].
One problem I had when I was working with this is that the pixels were not lining up correctly. Try overlaying the images and the CIELAB error to make sure your results are sensible.
Quick info on color differences (Score:1)
The difference between two CIELab values is called Delta E. You can find a formula here [popphoto.com].
Overthinking (Score:2)
You want to select colors that contrast with each other, yes? Humans are more sensitive to value than anything else. Painters and photographers and designers (well, not so many designers
Forget about saturation and hue -- if the value of the adjacent colors is 20-30% different, you can be pretty sure that most human beings will be able to see the contrast between them. Note that i'm talking about value in the sense of 0 being black and 100 being white. So you can easily make 3 or 4 colors simultaneously contrast with each other.
Feel free to pick hue and saturation at random, you'll have a pair of colors that contrast and go together. Doing more than 2-3 colors is harder to make the colors work together without someone with design skill stepping in...
Colour Separation... (Score:1)
The human eye does not see 'true' colours, but only what the pigments in the cones can detect.
This means that the numeric separation and the perceptible separation are not parallel if graphed.
You will need to adjust your calculations for the nature of the pigments in the human eye. And these differ somewhat (accounting for the 40+ types of 'colour blindness').
Why? (Score:1)
Theoretical models are an interesting thing, and if your goal is some kind of experiment into human perception, then I can't really help you.
However, having been a software engineer a long time, I've learned the hard way that you have to ask the right question first.
For example, if your goal is to produce only colors that have sufficient contrast to be readable (for example), that's a very different problem than if your goal is to exclude the fewest possible color combinations as unreadable.
A trivial solution to the first problem is to allow only black on white (or some other suitable selection), but it's probably a very unsatisfactory solution. However, thinking of it in these terms, it would be possible, for example, to generate a hash table of a very large set of possible color combinations, or even of ranges of reasonable color combinations.
This would be a very unsatisfactory solution to the latter problem though (BTW, I don't know of a really good solution to the latter problem in general... in fact I doubt there is one that would work at all unless you constrain the possible set of people that might try to view your images (due to various forms of color blindness up to and including total color blindness)).
But perhaps that's a useful hint anyway...
No clean solution... (Score:1)
The creation of a perceptually uniform color space (ie: where some metric, typically the Euclidean norm, between two colors is directly proportional to the "visible" difference between them) has long been a holy grail, and the color space generally accepted to do the best job is CIELAB. However, CIELAB is known to suffer from non-linearities throughout its gamut. Also, the approach you are taking is a little simplistic, as to accurately determine perceptual color distance you need to incorporate the viewing conditions at the viewer's end, plus the properties of the display.
If the purpose of this is simply to ensure that two colors are distinctive when placed together, the simplest approach is to use only the luminance information (there are many different ways of calculating 'luminance', but they all involve a weighted average of the color components); you can rest assured that if the luminance difference is large enough, the color's will be perceptually distinct.
This problem comes up a lot in color reduction literature, and there are tons of resources out there on this stuff... be sure to check out citeseer (researchindex.com). Some of the quick and dirty metrics I've seen that do a fairly tolerable job is to convert to luminance-chrominance colorspace (ie: YUV, YCbCr, etc...), and then take a standard Euclidean norm, but weight the luminance contribution heavier than the chrominance contributions (something like 2:1 works well). Again, this is far from uniform, but it's tolerable, and when used in color reduction algorithms produces noticeably better results than simple RGB Euclidean.
Tough problem with no clean answer. May I ask what exactly your not-for-profit organization wishes to do with such a metric?
There is no "good" solution. (Score:1)
I wish I had the link... but I was doing some reading of my own about color spaces a few weeks ago, and one article I read said that the CIELAB color space was intended to make it possible to measure perceptual differences between colors, but was found to be inadequate for the purpose. But there's currently no other color space that's better for the purpose.
Color Perception (Score:1)
range of 500-550 nm or so, which is corresponds
to green light. Human color perception is
a result of three different types of light-absorbing pigments (opsins) in the cones of our
eyes. One type absorbs best at about 425 nm
(blue), another at about 530 nm (green) and the
third at either 530 or 560 nm, (green or yellow,
but nonetheless referred to as the 'red' cone
opsin, for reasons which will hopefully be made
clear.) The two different values for the
maximum 'red' opsin absorbances are given because
there is a very common genetic variant even in
people with "normal" color vision that allows
some people to be much better at distinguishing
lower light frequencies (i.e. reds).
Human color perception results from the RELATIVE
amount of activation of the different types of
cone cells; thus, even though 'red' cones are
most adept at absorbing yellow light, green
cones are very active in this range also; as the
frequency decreases (wavelength increases),
the red cones are activated in higher proportions
relative to the green cones. An additional
factor complicating all of this is that the
numbers of different cone cell types in our
eyes is not equal; I forget which is most
prevalent, but they vary by a significant
amount. Anyway, all this might not seem
directly related to your question, but the
take-home message is different "normal"
people have different color sensitivities,
but since our ability to distinguish different
colors derives from being able to distinguish
between different levels of activation of
our various cone cells, our vision is most
attuned to color differences in the regions
where our cone cells have reasonably strong
overlaps- i.e. specifically between about 470
nm and 630 nm. (i.e. there are lots of colors
on both edges of our perception--blues and reds--
that we don't perceive differences between
very well.)
between very well.)
Why not ask the kids? (Score:4, Interesting)
-- MarkusQ
Graphic Gems books (Score:1)
Once had to same problem, (Score:1)
Re:Once had to same problem, (Score:1)
Yeah, your "formula" doesn't work too well for colors around #808080, does it?
--JoeThe problem. (Score:2, Informative)
Your problem is coming from an effect called Metamerism. This is a phenomenon that causes us to perceive 2 colors as the same when they are not.
The whole problem is caused by our moronic RGB model of light. It's not that simple, in reality. It's like thinking of the audio spectrum as being divided into Treble, Midrange and Bass, and all tones (frequencies) expressed as a "quantity" of bass, treble, and midrange. Stupid, hmm? Well, our RGB model has caused the same stupidity in the optical spectrum.
The visual spectrum is continuous, just like the audio and RF spectrums. A given light source (color) is almost never a single line color on a spectral scale, unless it's a monochromatic laser.
The different spectral peaks for a given light or color sample will be assimilated by your eyes and brain as a given color. There are MANY combinations of spectral peaks that can APPEAR to be the exact same color, yet a measurement system such as HSV or CIE or even RGB will see them as very different. This is called Metamerism.
Even worse, the effect is also compounded by a given color sample looking different under various spectral distributions of illumination (i.e. different colors of light)
For more research on this effect, consult the people that devised the CIELAB scale, Hunter Labs. I learned about this effect in a book written by them! Unfortunately, this book was lent to me by an old associate years ago, and I don't remember the details, like the exact name.
CIE-L*a*b* & Munsell (Score:3, Insightful)
An older approach is the Munsell system. [munsell.com] His system, which he began in 1898 with the creation of his color sphere, or tree, saw its full expression with his publication, A Color Notation, in 1905. It is not mathematically based, but rather each step corresponds to an actual equal perception step.
Even though there are surprisingly large [spie.org] discrepancies between CIE L*a*b* and isotropic observation-based color spaces, such as Munsell, a good bet is to convert your LAB into Munsell and go from there.
I have source code for this. (Score:2, Informative)
So before you convert a pixel to XYZ, do this:
[1] Make sure each component is in the range from 0 to 1 (so if it's from an 8-bit-per-channel image source, divide each channel by 255).
[2] Raise each channel to the power GAMMA, where you define GAMMA to be something like 2.4.
[3] Now push the colors through the 3x3 matrix you came up with (which of course requires you to know what your illuminant and RGB phosphors are like... I use illuminant D65 and the standard phosphor responses and get good results).
I have source code I can send you. jon@bolt-action.com. Also, search on the web for Poynton's "FAQ about Color and Gamma".
-N.
Some things to check out (Score:3, Informative)
As far as color discrimability, you might want to look for info on MacAdam's ellipses of just noticeable color differences. There's a picutre on this page [lcavwww.epfl.ch] which shows the main idea: how different a color has to be in order to notice the difference depends on what color it is. Humans can discern more shades of green than red or blue.
Vischeck (Score:1)
Try looking for the OSA-UCS (Score:2, Informative)
http://www.colorsystem.com/projekte/engl/49osae
Although the space presented is a bunch of discrete points, there exists formulae to relate the three coordinates (L,j,g) to CIE x,y,z. The corrected formulae are tucked away in this paper on page 18.
http://color.psych.upenn.edu/brainard/papers/sp
The space has the property that perceptual difference roughly corresponds to Cartesian distance between points for differences more than 20x just-noticable.
Also.. (Score:2, Interesting)
Subdividing color space (Score:1)
R, G, B... S? (Score:2)
"Retinal Envelope" (Score:1)
Try Tektronix HVC color space (Score:2)
XFree86 includes support for this colorspace in Xlib.
blue vs not blue (Score:1)
Use HLS (Score:1)
Note: some programs use HSB (Hue, Saturation, Brightness) instead of HLS, but it's basically the same thing (just a different order).
RMN
~~~
Colour Differences. (Score:4, Informative)
1) People are generally MUCH less sensitive
to differences in BLUE than in RED and
somewhat less sensitive to RED than to GREEN.
2) Gamma correction is poorly implemented across
the web - that results in great differences
in the percieved colours for the brightest
and dimmest R, G or B values. This is hard
to cope with.
3) Don't forget colourblind people! This can
result in people finding it hard to distinguish
various colour values depending on the nature
of their disability.
4) Women see subtle differences between greenish
blues MUCH better than men.
5) The CIE cromaticity diagram includes a bunch
of colours that a CRT cannot reproduce.
6) How distinguishable two colours are depends
critically on the backgrounds against which
they are presented and how close they are to
each other in space and time.
7) In the real world, colours can be pure,
single frequences of light - or complex
chords with many, many frequencies. A CRT
can only display light of three frequencies,
so most pure colours and even most mixtures
of colours can't possibly be accurately
depicted. Fortunately, human eyes can
only *measure* the light intensity at
three basic frequencies - so CRT's appear
to work acceptably. However, the frequencies
of light generated by the phosphors in a CRT
or the LCD's in a flatpanel are not the
same exact frequencies that the human eye
detects. That results in a lot of strange
non-linearities.
8) The colours produced by a particular RGB
triplet will be different on CRT, LCD,
printer ink, etc. That can make a huge
difference in readability.
CONCLUSION:
~~~~~~~~~~~
You have a LOT of research to do!
Not just distance, but spectrum (Score:2)
...since Psych 101 covered that blue and red make the most psychologically disturbing color combination, despite their difference in colorspace. I think it could have something with them being on completely different ends of the visible spectrum.
This does remind me of the info on mutant tetrachromat females [slashdot.org]. And also for the different types of normal color blindness. A color-blind friend from work pointed out this page on the types [colorfield.com] to point out the different effects. And a different co-worker happens to be an extremely rare type, perhaps 'monochromat?'
Anyway, what you use should consider distance in colorspace, and also position in the spectrum, with the effects of the different types of colorblindness taken into consideration also.
Spatial CIELAB (Score:3, Informative)
http://white.stanford.edu/~brian/scielab/sciela
vischeck.com also have an interesting take on simulating color deficiencies (although not the perceptual differences between 'regular' colors). 'Color blind' might be interested in this.
just to make sure... (Score:1)
because if you just pick two colors in CIELab and test them, then convert to RGB you would be outside of its gamut most of the time.
i thought i'd ask, just to make sure.
MacAdam Color Discrimination Ellipses (Score:2, Informative)
You can try to work these ellipses into your formulae, and people like Parra in France and Parry Moon in Camridge (MA) had tried to distort these color ellipses back into circles in trying to find a
transform of these color spaces into a perceptually uniform color space. But the key thing is that the monitors will differ, the monitors' settings will differ, (the phosphors don't really differ that much between CRTs, but the primaries for CRTs are very different from that of LCDs and that of projectors using LCDs or DLP/DMDs), and most importantly the viewers' photopigments will also differ. Along with the well known ~10% of males that are dichromats, a large number of the population are anomalous trichromats. The actual numbers are still being tallied, and it is still in a very conjectural stage whether most people have multiple copies of the L-opsin gene or multiple copies of the M-opsin gene. The Nathans are on one side of this and the Neitzes are on the other side of this. Which is which, I keep forgetting.
But a quick summary is:
the majority of human subjects are most sensitive to changes in the red (+L-M) or green direction (-L+M), with changes of 0.3% being perceptible for targets of 2-10 degrees in size, mediumly sensitive to changes in intensity (+L+M[+ maybe S]) {there are HUGE arguments and PhD theses brewing over this} for brighter and -L-M[ - maybe S] for darker), and least sensitive to changes that affect the S-cones (+S, kind of a violet change, -S, kind of a greeny-chartreuse change). This, along with the MacAdam Discrimination Ellipse, are for a target color being compared to the immediately adjacent surround color. This does not hold true for nonadjacent and distant targets being compared or for targets subtending visual angles much larger than 5 degrees or much less than 1-2 degrees. There are some funky changes that occur when you get to targets of less than 1/2 degrees in size and when you start to talk about colors that you don't look at foveally or centrally.
That may answer your question. And it may even lead you towards a workable plan on equi-perceptual space. (work with CIE xyz and integrate MacAdams' discrimination data). But realize that MacAdams' work, like much of visual psychophysics is based on less than 5 (count 'em five) subjects. Most visual psychophysics papers today usually have the authors and their post-doc slaves as the only subjects. But actually coming up with that will take data collection on the scale of a PhD thesis, and working within the CIE color space, even from 1931, is probably close enough for most work, even if some of your side-by-side colors are twice as far in color space than they need to be at minimum.
Shouldn't be too hard, with basic color theory (Score:3, Informative)
Of course, there're two more variables: Saturation and Value. Imagine in the center of the circle there's a dot of neutral grey, and a gradient from that grey out to the colors. That is, a dot on the edge at 120 deg. would measure as Green at it's highest saturation point, and as you move to the center of the circle, it would get duller and duller until it reached grey. The same for all the other colors. This way you can measure a color's saturation.
Now for the most important aspect: Value. Value is a measure of how light or dark a color is of you took away all the color information (ie, converted it to greyscale). One of the first things you learn in art school is that a difference of Value is higher contrast than a difference of Hue or Saturation. Black on White is the highest contrast you can get, and Red-on-Green and Red-on-Grey fall somewhere in the middle. So you now have to extrude to color model in 3d space so it looks like a cylinder. The top disc should be all white and the bottom disc should be all black. Now you can find out the difference in contrast of two different colors by locating them on the model and measuring their relative distances in 3d space. The tricky part: how tall do you make the model? I'd recommend about twice as high as it is wide. This would mean that White on Black is twice as contrasty as Green on Magenta.
Now here's the really tricky part: the original color wheel you made in the beginning isn't just a flat disc in the center of the cylinder- it's all floppy. The Cyan and Yellow edges should be close to the top, since they're very bright (close to white), and the Red and Blue ends should be nearer to the bottom, since they're darker.
Photoshop does a pretty good job of representing everything except the last paragraph. If you go to the color picker and click on the H toggle button (HSB), you'll see that the rainbow strip represents the circumfrence of the original circle, and the x-axis in the grid represents Saturation while the y-axis represents Value (Brightness). Where it falls short is it says that Cyan at it's highest Saturation is no brighter than Blue (fully saturated)! Of course, it's obvious that Cyan (with a perceptual brightness of (I'd say) around 95, is much brighter than Blue (which I'd guess had a perceptual brightness of 30 or so). But there are good reasons why Adobe chose to do the HSB color measurements this way.
Hope this helps. I don't know how you would program it, but it's good for picturing it in your head.
Josh
Why? (Score:2)
OK, I have read and reread the original post a few times now and have read most of the highest moderated comments and I still have a question: why? Why are you trying to determine this? Are you designing a website? If so, why do you need a mathematical model? I work closely with a designer with many interactive (read: web) site designs under her belt and I can assure you, she uses no mathematics in making very amazing designs.
So, pray tell - what do you need this for? Especially considering that if you are working on a website, you should really consider limiting your colorspace to the 216 (or so) web-safe colors. It's not so much to support people with 8-bit color (though many such machines still exist) but more to provide a more uniform experience across multiple platforms (read: video cards, monitors, gamma corrections, etc.)
Also, don't forget that a not-for-profit must conform to S.508 accessibility guidelines (you're familiar with that as a not-for-profit web developer, right?).
Empircal lookup tables (Score:2)
Anyway, my solution was to resort to empirical testing, and stash the result in lookup tables. Since I was only interested in the "web safe" color pallette, the number of colors I had to deal with was easily manageable. I wouldn't be suprised if this is the right way of doing it even with a larger color space (you could record data for a coarse mesh and then try and interpolate the results for the colors inbetween your test cases...)
Hire a good artist.. (Score:3, Insightful)
Color spaces are great for development of the displays and printers - there you have to get down to as few basic parameters as possible. They are useless for designing output of printers and displays..
Sounds like you haven't taken gamma into account (Score:3, Informative)
CIELAB is reasonably accurate for evaluating color differences, but research in color spaces that more accurately reflect perception is ongoing - a good recent paper is this one [rit.edu]. Also, the Argyll [access.net.au] color management system implements most of the color goodies you might want, including CIECAM97 (which is widely considered to be an improvement over CIELab).
It's amazing to me how little (and poorly) color theory is taught, in spite of color being one of the more universal human experiences. My guess is that this is largely to do with the cross-disciplinary nature of color. It's not merely a branch of physics, psychophysiology, pigment chemistry, math, or art, but overlaps all of them.
Try the gamut changes and see if that helps.
Suggestion. (Score:2)
Convert to "lumniance" using the standard formula (something like Y=0.30 R + 0.59 G + 0.11 B), and then use colors that are "different" by enough. Say 0.2 in 0-1 colorspace.
The idea is that some 5% of the male population is colorblind and will not see differences that a 3D model might imply. You will want to stay friends with such a population group......
A very small percentage of people is completely colorblind. So we might want to take the 5% into account but neglect this class of people.
That would allow us to map the RGB to to a 2D space, and then define "don't use" colors as lying near the current color. But What's the use?
If you map my luminosity rule back to RGB space, you'd be forbidden to use colors within a elipsoid around the current color. Or you can scale the color cube to a rectangular block: 0.11 wide in the Blue direction, 0.59 wide in the green direction and 0.30 wide in the red direction. Then the forbidden region would be a sphere with radius of 0.20 .
Note that the sphere would always extend to outside the color-block in the blue direction this way, and that implies that you cannot use colors that differ only in blue content. So "black" (0,0,0) and "blue" (0,0,1) would be considered "the same" with this model.
But they are NOT, you might say. Well, maybe, but didn't you ever notice that reading blue letters on a black background make you tired really quickly? Now you know why: There is very little luminosity difference...
Roger.
Did this a couple of years ago (Score:3, Interesting)
People (graders) using neon chalk would write on boards (The marks would designate the board quality, and where to cut the bad pieces off.) The boards and chalk would go under a housing with UV light, which had a photosensitive trigger. The trigger would signal the computer, to capture the image. The computer would analyze the image, and send out appropiate bits to a PLC which controlled the saws and sorting.
As you have found out, RGB does *not* uniquely identify colors. We worked around that problem in 2 ways:
1) carefully choosing our chalk color.
2) I then converted the colors over to HSB and used a relative error of Hue to determine if 2 colors were "close enough."
It wasn't perfect, but it was close enough and extremely fast.
I doubt HSB will be sufficient for your domain, but see if you can "change the problem" to make it more computer friendly
I'd use HSV (Score:2)
Re:Solutions (Score:2, Informative)
Re:This is relevant why? (Score:3, Interesting)
There are a load of tricks for generating colours which usually work well together; however, the hue rotations trick sometimes generates totally unreadable combinations (mainly with bright colours). Having an additional check would be extremely useful.
Anyway, it could be that you're good at graphics, in which case good for you. Just give the rest of us time to catch up
See also: (Score:1)
But re. automated colour scheme generation:
Paul Lyons at Massey University (google is your friend) also describes ways for CS people to fake it - though from the presentation I saw, many "harmonious" colour combinations are not high-contrast, which seems to be what the question is about.
Re:This is relevant why? (Score:1)
This question seems relevant to me, because of the increasingly visual nature of the WWW. Getting more information on this particular topic could be very handy in the field of usability. Too much software (especially on the web) is really lacking in that department.
Since I suspect there are many software developers/engineers among the slashdot crowd, I think this question does matter.
Re:This is relevant why? (Score:3, Insightful)
In order to help those of us who can't match our shirts with our pants, various "color models" have been developed over the past 340 years (although some pre-date plato), including RGB (cube), HSV (tetrahedron), CIE, YIQ, PANTONE (spherical/spiral), etc. Although this question is not exactly technical in nature, the underlying problem is about the mathmatics of converting the various geometries of the color spaces with an emphasis on web usability and accessibility... gdb with or without a serial cable is of little use here.
Check out: http://www.adobe.com/support/techguides/color/col
And for the math:
http://academic.mu.edu/phys/matthysd/web226/L02
Re:This is relevant why? (Score:1)
Man, if you don't care about it, don't read or comment on it!
Are you suggesting that the 15 seconds it takes you to read the front page story and decide if it interests you is too much of a waste of your time, nevermind the people who are interested by it? That is really what the editors do...every story has a group who will be interested and a group that won't be. They decide if enough people will be interested in the story to justify sacrificing the 15 seconds of time uninterested people like you will spend looking at it.
If you don't think something is worthy of slashdot, just relax and move on.
Re:This is relevant why? (Score:2)
PS. Yes, you are trolling and I fell for it. Well I was bored :).
Re:lp (Score:1)
Re:Just eyeball it.... (Score:2)
Re:I am confused (Score:1)
Move along, nothing to see.