AndyWood gave a good explanation, but let me elaborate. If you saw the scene depicted, but in real life—rather than on a flat paper or 2D screen—you would be correct to infer that the actual, invariant colors of the tiles are different. But, since they are just pixels on paper or a screen, their invariant colors are the same, and yet your eyes tell you otherwise.
So are the eyes “wrong” in any serious sense? Well, let me put it this way: do you want
a) a visual system that gives the right interpretation of scenes that you are actually going to encounter often, but is tripped up by carefully designed optical illusions?
or do you want:
b) a visual system that gives the right interpretation for carefully designed optical illusions, but fails to catch many attributes of common scenes?
(Yes, there is a tradeoff. Your visual system encounters an “inverse optics” problem: given the retina images, what is the scene you’re looking at made of? This is ill-posed: many scenes can generate the same retinal images. E.g. a given square could be far away and big, or close and small. To constrain the solution set, you need assumptions, and any set of assumptions will get some scenes wrong.)
Yes, you are wrong to think that the tiles have different colors. You are not wrong to prefer a visual system that gets most scenes right at the cost of getting a few scenes (like this one) wrong.
(Incidentally, I really like this optical illusion, and have it by my desk at work. What’s so great about it is that once you see it, you can actually strip away everything that you think is causing the illusion, and yet they still look different!)
AndyWood gave a good explanation, but let me elaborate. If you saw the scene depicted, but in real life—rather than on a flat paper or 2D screen—you would be correct to infer that the actual, invariant colors of the tiles are different. But, since they are just pixels on paper or a screen, their invariant colors are the same, and yet your eyes tell you otherwise.
So are the eyes “wrong” in any serious sense? Well, let me put it this way: do you want
a) a visual system that gives the right interpretation of scenes that you are actually going to encounter often, but is tripped up by carefully designed optical illusions?
or do you want:
b) a visual system that gives the right interpretation for carefully designed optical illusions, but fails to catch many attributes of common scenes?
(Yes, there is a tradeoff. Your visual system encounters an “inverse optics” problem: given the retina images, what is the scene you’re looking at made of? This is ill-posed: many scenes can generate the same retinal images. E.g. a given square could be far away and big, or close and small. To constrain the solution set, you need assumptions, and any set of assumptions will get some scenes wrong.)
Yes, you are wrong to think that the tiles have different colors. You are not wrong to prefer a visual system that gets most scenes right at the cost of getting a few scenes (like this one) wrong.
(Incidentally, I really like this optical illusion, and have it by my desk at work. What’s so great about it is that once you see it, you can actually strip away everything that you think is causing the illusion, and yet they still look different!)