Bharamind

Illusions / Simultaneous contrast

Simultaneous contrast illusion

The same gray looks lighter on dark and darker on light.

Measured from the image

Sliders

Make your own Simultaneous contrast image

How the effect works

Two gray patches sit on two backgrounds, one dark and one light. The patch on the dark background looks lighter. The patch on the light background looks darker. Both patches have the same gray value.

The build script reads the red, green and blue values of each patch straight from the pixels. The two readings are identical. The script reads both backgrounds as well and prints the difference between them. Your visual system pushes each patch away from its surroundings, so a dark surround makes a patch look lighter and a light surround makes the patch look darker. The history section below names the person who described the effect for dyed cloth.

Set both backgrounds to the same gray and the patches match to your eye too. The effect needs a difference between the backgrounds. The sweep table raises the light background step by step and prints the surround difference at each step. Move the patch size and compare a small patch with a large one. Try this test: lay a sheet of paper over the image with two small holes cut where the patches sit. Seen through the holes, the patches look alike.

Measured at the default settings

Image size: 440 by 220 px. The build script read these values from the rendered pixels.

Left Patch R G B
[128, 128, 128]
Right Patch R G B
[128, 128, 128]
Left Surround R G B
[40, 40, 40]
Right Surround R G B
[215, 215, 215]
Left Patch Center
x 110, y 110
Right Patch Center
x 330, y 110
Surround Contrast
175

Where the effect weakens

The table sweeps Right surround grey level and scores a geometric proxy from 0 to 1: Surround difference / 255. The proxy comes from the image geometry. The proxy measures geometry and not perception. Your own eyes decide what you see. Rows below 0.5 are marked weak.

Weak range: 40 to 160 grey level. Proxy at the default setting: 0.686.

lightSurround (grey level)ProxyPatch Left GrayPatch Right GraySurround Contrast
400 (weak)1281280
600.078 (weak)12812820
800.157 (weak)12812840
1000.235 (weak)12812860
1280.345 (weak)12812888
1600.471 (weak)128128120
1900.588128128150
2150.686128128175
2550.843128128215

Try this

History

Only facts confirmed against a source appear here. Where sources disagree, this site leaves the detail out.

More illusions

Entertainment only. Not a vision or health test.