Contextual Color Perception

Mind reeling.

A and B are ~#666666 gray. The parts of my brain not reading this information out of photoshop strongly disagree.