Contingent perceptual aftereffect

Contingent aftereffects are best exemplified by the McCollough effect. The McCollough Effect is one of a family of contingent aftereffects related to the processing of color and orientation. A contingent aftereffect differs from an afterimage or simple aftereffect (like the motion aftereffect) in that the effect only obtains with the proper stimulus. For example, the McCollough Effect is an orientation-contingent color aftereffect. One induces the aftereffect by exposure to a magenta and black vertical grating alternating with a green and black horizontal grating. After a few minutes of induction (5 or more is best), followed by a break of a few minutes, black-and-white vertical and horizontal gratings will appear colored. The verticals will look green and horizontals pink in the example given. The illusion will reverse if one rotates one's head 90°.

There are also motion-contingent color aftereffects, and other varieties of these phenomena.