Gradients and shadows give your brain clues based on your past experiences with shadows. But shadows can lie to you. They make your brain see different colors even tho they are the same colors because they put the light gradient by the dark gradient making it look that way.
If you cover up the middle of the squares with your fingers you can see that they are the same colors on top and bottom.
Plait, Phil. "An Optical Illusion You Will Swear Is Fake. It Isn't." N.p., n.d. Web. 19 Mar. 2015.