#1 Technically , these are not even squares, let alone being of same colour. Upper is grey with a black shadow, and lower is white with a grey shadow. So, not the same colour.
Our brains automatically adjusts color based on surrounding shadows. Since B is in the shade of the green cylinder, but is still the same color as A, the brain believes that it's a lighter shade of grey.
#1 Technically , these are not even squares, let alone being of same colour. Upper is grey with a black shadow, and lower is white with a grey shadow. So, not the same colour.