Click on the below images to get larger views”

Squares A and B are the same color. If you print out this picture and cut it apart you will see this yourself.

The gray bar is one tone. It is the changing background that makes it appear to change in tone. Cover up the background to prove this to yourself.
Even after you learn how they work, there are many visual illusions that still fool you. If you returned and look again at the visual illusions shown and explained above, many will still fool your eyes.
The mind contains compartments that perform specific tasks. For example, one compartment is used for comprehending spoken language, another for perceiving smell. Some of these compartments are isolated from other parts of the brain. They work on their own, not influenced by goings on elsewhere. These compartments sometimes are even isolated from conscious knowledge.
The perception of many visual illusions is made independent of your conscious knowledge. This explains why even your conscious knowledge that they are illusions doesn’t solve your nonconscious misperception.