Slashdot Mirror


Determining Color Difference Using the CIELAB Model?

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?"

7 of 199 comments (clear)

  1. Ask /.? by ryants · · Score: 2, Insightful
    --

    Ryan T. Sammartino
    "Ancora imparo"

  2. Perceptually equal color spaces by Joe+Decker · · Score: 5, Insightful
    None of the standard Photoshop, et al color spaces is designed to produce perceptual equivalence, perception is just too complex.

    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.

  3. Re:Perceptually equal color spaces (addition) by Joe+Decker · · Score: 2, Insightful

    Oh, just to make things even more difficult, two colors which are quite perceptually distinct may still make poor colors for text legibility. Try reading bright red text on a bright green, equal-intensity background. (Even if you're not red-green color-blind.) I suspect without evidence that text legiblity is more strongly related to luminosity differences than to perceptual difference metrics.

  4. Re:This is relevant why? by Anonymous Coward · · Score: 3, Insightful

    This is an excellent question, as male engineers have the tendancy to be Red/Green colorblind.

    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/colo rmodels/main.html

    And for the math:
    http://academic.mu.edu/phys/matthysd/web226/L022 1. htm

  5. CIE-L*a*b* & Munsell by michaeldouma · · Score: 3, Insightful
    For measuring color differences, your are on the right track. CIE-L*a*b* was designed to be fairly perceptually even, but it is still quite nonlinear and delta-E values mean different perceptual steps for different hues, as seen in the shapes of acceptability ellipses. Here's some samples.

    An older approach is the Munsell system. 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 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.

  6. Hire a good artist.. by Axe · · Score: 3, Insightful
    ..stop wasting your time and your company money - hire a good artist/consultant to disign and review colors. There is no magical formulas that can substitute expert human opinion, on what is nice to see.

    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..

    --
    <^>_<(ô ô)>_<^>
  7. Re:Damn the monitor, shift to R Theta color wheel. by benjymous · · Score: 2, Insightful

    Red and green may be opposite each other on the colour wheel, but have you ever tried reading red text on a green background (or vice versa?)

    --
    Help me! I'm turning into a grapefruit!