The way a colour's appearance shifts because of the colours around it: it looks lighter beside dark, darker beside light, and pushed away in hue from its neighbour.
A perceptual effect of the visual system comparing neighbouring regions rather than judging each in isolation. A grey on a red ground looks faintly greenish; a colour beside its complement looks more saturated.
Nothing about the colour itself changes; a measuring instrument reads it the same in either setting. It is not a display or printing fault.
The same mid-grey square looks lighter on black paper than on white.
It explains why a colour chosen in isolation can look wrong once it sits next to others, in rooms, outfits, charts and make-up alike.
The effect is quantified by matching. An observer adjusts a patch on a neutral background until it looks the same as an identical test patch on a coloured background, and the difference between the two settings is the size of the induced shift. Laboratory work of this kind finds that the shift is in the direction away from the surround, and that it is stronger and varies more between people for complex, recognisable shapes than for plain squares.
One grey is used for text on both a light panel and a dark panel of the same interface.
It looks darker on the light panel and lighter on the dark one, so two elements with the same token appear unrelated. Systems that care define separate values per background and match them by eye.
A map or heat chart uses the same colour for one value in different places.
A mid-value cell surrounded by dark cells reads as higher than the same cell surrounded by pale ones, and readers misjudge the data. Thin neutral borders between cells reduce the effect.