The squares labelled A and B are actually the same colour. But because of what is around it, our brain fills in the gaps and goes “well now, we can’t have that thing messing up such a lovely pattern! I’ll just make it look like a white square in a shadow! c: ”
Your brain outright lies to your consciousness in order to make it look okay. If you remove the things around it, you get two squares the same colour.