Skip to content
IllusionsBlog

Light and color

Simultaneous contrast

Two identical gray squares look different shades on different backgrounds.

TypeLight and color
InteractiveYes: sliders and a check
First described1800s

The left square looks lighter than the right one. They are exactly the same gray.

Try this

  • Drag Background contrast to 0 and they match.
  • Tick Join the two squares to connect them with a bar of the same gray.

Why it happens

Your visual system is far better at comparing than at measuring. Cells in the eye and brain respond to the difference between a patch and its surroundings, so the same gray against dark looks light and against light looks dark. Beyond that, the brain tries to work out the real color of surfaces under different lighting, a job called lightness constancy. Paola Bressan reviewed the many lightness illusions and the theories behind them.

Did you know?

This is why paint swatches look different on your wall than in the store, and why designers check colors against the background they will sit on.

References

The illusion on this page is drawn by code written for this site. Last checked 1 November 2026.

Frequently asked questions

Are the gray squares the same color?

Yes, identical. Join them to see.

Try these next