This optical effect is pretty cool.
See the blue and green spirals in the picture above?
They are actually both the same colour! (green, in fact)
We perceive them to be different due to the different colours next to them. Our retina has two different types of light detecting cells – rods (120 million of them) and cones (7 million).
The
numerous rods are good at detecting movement and work well in low light. They are responsible for our peripheral vision – one of the main functions of which is to warn us of rapidly approaching threats (quick, duck). They work in black and white, and are incredibly sensitive.
The cones are concentrated in the central part of our retina, called the macula. They enable focused vision. There are three types of cones, each of which responds maximally to different wavelengths of light ie colours (red, green, blue). Just like the inks in a printer, the brain combines their signals it receives from the different cones to perceive the full spectrum of colours. Colour blindness is caused by an absence of one or more the three different types of cones.
The optical illusion above is due to the adjacent colours stimulating the different cones in an overlapping way that confuses the eye.
More on rods and cones at
http://hyperphysics.phy-astr.gsu.edu/hbase/vision/rodcone.html