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
- Bressan P. (2001). Explaining Lightness Illusions. Perception, 30, 1031-1046. doi:10.1068/p3109
- Gilchrist A., Kossyfidis C., Bonato F., Agostini T. (1999). An anchoring theory of lightness perception.. Psychological Review, 106, 795-834. doi:10.1037/0033-295x.106.4.795
- Background on Wikipedia
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
Light and colorWhite’s illusion
Gray bars look darker on white stripes and lighter on black stripes, the opposite of what contrast predicts.
Light and colorHermann grid
Gray spots flicker at the crossings of the white streets, except where you look.
Light and colorScintillating grid
Black dots flash inside the white dots, everywhere you are not looking.