Checking the color of the pixels is meaningless. That's the color of the PICTURE, not of the dress.
Color captured by the camera is what the dress reflected off the incident light. If the incident light isn't white, you get different colors.
Our eyes also saturate to change the white point of the images we see, that is, everything eventually becomes color-balanced. That's one of the reasons why f.lux works. You can also easily perceive this if you remain for some time in a room with a certain color or brightness, and then leave it. Everything will look tinted by the complementary color for a while, until your eyes adapt again. For instance, if you're inside a room with red light, you get a cyan tint afterwards.
This is exploited in the famous Spanish castle "illusion". Also, note that this is the same reason why leaving a dark room we get a glare, or entering a dark room you can't see anything for a bit. This is an entirely physical/chemical phenomenon: photoreceptor are saturated more under high exposure to specific types of light. So calling it an optical illusion may be wrong.
And finally, there's also more subtle post-processing done by the brain.
So there's a lot of things at play here way beyond the simple pixel color.