The term simultaneous contrast is often used to describe variations in luminance between objects and their surroundings, but simultaneous contrast effects can also be demonstrated for differences in chromaticity (referred to more informally as hue, or, more informally still, colour) alone. This can be demonstrated, often very convincingly, with a pattern in which two large X characters are drawn in the same colour on backgrounds of differing hue. The colour of the X's is in fact a perceptually equal mixture of the two surrounds. When the colours of the backgrounds are equiluminous, a reverse ground effect occurs in which each X is perceived as being the colour of the opposite background.
The demonstration applet allows you to explore this effect by adjusting the luminance of each background in the pattern. You can also use it to determine how robust the illusion is with a couple of controls that aim to destroy or interfere with it.
When the applet window first appears you will see two large X characters, one drawn against a yellow background and the other against a gray background. Depending on the characteristics of your display (and to some extent the ambient lighting) you may need to adjust the luminance of one or both backgrounds in order to achieve the colour reversal effect. The Yellow and Gray sliders can be used for this purpose. In most cases you will find that the gray slider must be set to the left of the yellow slider for the effect to occur. You should set the gray slider just left of center, then move the yellow slider from that position towards the right until it appears reasonable to describe the left X as gray and the right X as yellow. (Some fine tuning is in order at this point to achieve the strongest possible effect.)
When showing this illusion to an audience, it has proven effective to quietly set the yellow and gray sliders with neither explanation nor introduction to the effect. Then state the claim that the two X's are the same colour and ask the audience to tell you whether they believe you. (This is of course a trick question, as explained in the discussion section below.)
If enough people are willing to agree that the colours of the X's are apparently different, you can then use the remaining controls to test the strength of that perception. The Thickness slider simply adjusts the thickness of the X characters. (The original author of this page has not found this control to be particularly useful, but your mileage may vary.) Selecting the Connected switch usually elicits the first "Ahh" from the audience as it becomes possible to trace the pattern from a point where it is apparently yellow to one where it is apparently gray. The White top switch replaces the backgrounds in the top half of the pattern with white on both sides. This is usually sufficient to destroy the illusion, although you may be able to cause it to return by focusing your attention solely on the bottom half of the pattern.
As for all demo applets, the Dismiss button at the bottom of the applet window will remove the window from the screen. Selecting the APPLET link at the top of this page will then return it to the screen just as you left it.
Although this illusion is very simple, it deals directly with a very important issue in Computer Graphics and Human-Computer Interaction. Namely, are the two X's the same colour? The pixels of both X characters are generated by storing identical colour values in the frame buffer. In this sense they certainly are the same colour. On the other hand, what does "colour" really mean? We know to describe the left hand background as "yellow" because we have learned to attach that label to the perceptual experience it evokes. In this sense, we describe the left X as gray and the right X as yellow (assuming that the illusory effect has been achieved) because those are the labels we have learned to associate with the perceptual experience each X provides. In this sense, the two are definitely not the same colour.
At this point you may find yourself thinking that it is still more sensible to say that the two X's are in fact the same colour. The fact that they appear to be different is, after all, only an illusion. To do this, however, is to elevate the importance of the frame buffer to a level greater than that of the observer. It is humans who give names to colours based on what they perceive. If it looks yellow, then it is yellow, regardless of what its tri-stimulus values may be. Ideally, when human and computer disagree, it should be the computer that compensates for the predictable properties of the human visual system, not the observer that must adapt to the rigid behaviour of the machine.
It may never be possible to incorporate all of the visual system's subtleties into rendering algorithms, if only because these properties differ somewhat from one observer to another. On the other hand, anticipating the larger and more predictable effects should not be difficult.