Color = XYZ tristimulus?

How many colors in this drawing?

That depends on how we define color. And I’ve decided that it isn’t particularly important how we define “color” — instead, the perceived difference between the interior bars on the left and the interior bars on the right, that is what’s important.

The whole point of that drawing is that all the interior bars are exactly the same XYZ — I know because I drew it — but they do not all look the same. To me, at least, the left ones look yellowish, but the bars on the right look like gray. This effect is called “simultaneous contrast”.

Let us ask an explicit question: does a set of XYZ coordinates specify a unique color?

As you can see from my comment here, I went along with Giorgianni and Madden (bibliography), saying no, that a set of XYZ coordinates is not equivalent to specifying a color.

In retrospect, I wouldn’t be surprised if some of you decided that I didn’t know what I was talking about. I’ll admit that I’ve learned something.

To my shock — “surprise” is too mild a word — I learned that “Real World Color Management” (bibliography) takes the opposite stance. They declare, on page 84, “When a color is defined by XYZ or LAB values, we know how humans with normal color vision will see it.”

Whoa. They seem to have just said that XYZ specifies a unique color. More, they’ve done it impicitly (“color defined by XYZ”) and explicitly (“how … will see it”).

I don’t really understand how they could have said that, however, because they themsleves provide (p. 22) an interesting optical illusion “based on a painting by Josef Albers”. They refer to this as an example of “simultaneous contrast”.

I found a copy of their illustration here. (It’s the one with two X’s, rather than the one with a single bar.)

I didn’t want to copy either the book or the URL, so I made my own — that’s what opened this post. The contrast isn’t as good as the ones based on Albers’, but I think it makes the point.

I have used Apple’s DigitalColor Meter to read the tristimulus values of my drawing, and of the drawing at the URL: mine has exactly 3 distinct sets of XYZ values; the drawing out at that URL is close, but each of the arms in their X’s is not exactly constant XYZ. I have not scanned and checked the drawing on p. 22 of Real World Color Management. (And, in fact, I suspect that the scanned image would not have exactly three sets of XYZ values.)

For what it’s worth, the XYZ values I read off my own figure are:

gray backgound: 38.516, 39.944, 32.950
yellow background: 48.352, 53.281, 9.216
interior bars: 28.854, 32.193, 11.606

And, also for what it’s worth, I created my drawing using HSB. I knew I wanted gray, muted yellow, and an even darker yellow. HSB let’s me play with colors precisely that way.

These drawings clearly demonstrate that the same XYZ can result in different perceptions. The XYZ values of the interior bars do not describe what we see.

“Simultaneous contrast” is not explained by the XYZ values of the interior bars. If we do have a math model of it — I don’t know yet if we have one, I’m still waiting for Fairchild’s “Color Appearance Models” to arrive — the model must have more in it than just the XYZ values of the interior bars. Of course, one expects to use the XYZ values of the backgrounds, too, as well as other properties of the drawing.

It might be revealing to try to adjust the XYZ values of the bars on one side to give a visual match to the bars on the other side. Of course, we’d have trouble at the boundary, so we might need a gradient — or we might need to break the connection between the interior bars.

Without searching my books, let me say that I wouldn’t be surprised to see this described as an optical illusion “because all the interior bars are the same color” — and, once upon a time, I would have said the same thing. In fact, I would still say the same thing in casual conversation, but from now on I would probably have to qualify it by saying something like, “for some definitions of color”. (Sometimes there’s just no going back.)

Having said that, let me return to the beginning of my argument: it’s not a big deal whether we say they are different colors or not. What is a big deal is that we have just exhibited a color phenomenon which is not explained by XYZ coordinates.

I would say that we need to be very careful about using XYZ to understand the perception of color.

I’d like to point out that even that common phrase, “perception of color”, is sloppy. That preposition, “of”, hints that color is out there and we perceive it — that color is what our eyes detect.

In contrast, a slight change gives us the phrase “color perception”, which better allows for the possibility that light is out there, and our brains translate it into color. Light is what our eyes detect, and color is the result of our processing the light.

So XYZ isn’t always enough to describe our color perception.

And consider any other specification that starts with the same values for all the interior bars — how can it explain that the bars look different to us?

As I said, Fairchild’s “Color Appearance Models” hasn’t arrived yet, but Kuehni & Schwarz, “Color Order: A Survey of Color Order Systems from Antiquity to the Present” has arrived. Let me quote them (p. 92):

There is general agreement that three attributes are sufficient to fully define color percepts in any given viewing situation but not across viewing situations…. the relationship between stimuli and percepts usually changes as a function of surround and lighting quality.

So, how many colors in my drawing?

There are exactly 3 distinct color stimuli, but at least 4 color percepts; I take it that the gray and yellow backgrounds are a “change of surround”.

Posted in color. 5 Comments »

5 Responses to “Color = XYZ tristimulus?”

  1. Says:

    nice color trick. testing our eyes. thanks for posting

  2. Monstro Says:

    The XYZ tristimulus values describe in a linear vector space , the nature of color. How we visually interpret it depends on a lot of other variables, such as the RGB color space used, or for HD TV’s, the YCbCr color space, the bit depth of the color, gamma compression and decompression, and any type of loss due to internal color space transformations going down the tranmission pipeline…

  3. rip Says:

    To All,

    An interesting question about XYZ and CIELab was asked here and answered here.

  4. greg aiken Says:

    dear rip, i am very interested to learn the exact formulas to go from spectral data to XYZ, then onto CIElab. for now, im aiming for the first step – spectral data to XYZ. ‘faq’ page has a statement that basically says if one has:
    spectral data (for item to be quantified),
    CIELab 1931 standard observer 2 degrees 5nm spacing coefficients,
    coefficients for the ‘standard illuminant’ you wish to use for the calcs…

    that its basically a matter of performing simple multiplication of these coefficents on a frequency band, by frequency band basis, and then performing an integral – and finally ‘normalizing’ the result set. in theory, it doesnt sound too difficult for even a person like me to do.

    suppose i have such data at my disposal:

    a. CIElab table (for first few 5nm spaced frequency bands):

    360, 0.000129900000, 0.000003917000, 0.000606100000
    365, 0.000232100000, 0.000006965000, 0.001086000000
    370, 0.000414900000, 0.000012390000, 0.001946000000

    b. heres some coefficients I found for a standard D65 illuminant:

    360, 46.638300
    365, 49.363700
    370, 52.089100

    c. and lets assume we can just ‘make up’ some arbitrary ‘measured’ spectral data of some sample that’s been measured with a spectrometer.

    360, 50
    365, 52
    370, 55

    notice, CIElab has ‘3 values’ for each spectral band (r, g, b sensitivity).
    notice, standard illuminant has 1 value for each frequency (intensity)
    notice, sample ready by spectrometer has 1 value for each frequency (intensity).

    given this simple set of just a few bands, how are these calculations performed?

    your help will be greatly appreciated.


    Greg Aiken

    ps – I also noticed in these published tables of coefficients that some of the values have value greater than 1, or 100 in the case of the standard illuminant. if one characterizes the response of the human eye, as in the cielab coefficient table, how can there be values higher than 1 (if 1 represents the greatest sensitivity at a certain frequency)? similarly, when one analyzes the coefficients in a table of a ‘standard illuminant’, how is it possible to find values greater than 100, if 100 represents the maximal output at a given frequency? im (as you can tell) obviously ‘thrown off’ by the notion that some of these tables are not ‘normalized’ – i would have expected all of these tables would contain ‘normalized’ values 0 to 1, or 0% to 100%.

  5. rip Says:

    Hi Greg,

    Welcome back. The first post in which I did these calculations for real was

    so I suggest you start there.

    As for the normalizations, one that I’ve seen is 100 at one specific wavelength. You’re going to divide by an appropriate factor, so it will work out.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: