Let’s establish one thing before we start - the dress is blue and black. Once we accept that, we can move on to talking about an interesting bit of animal biology, namely how our eyes and brains have evolved to perceive colour.
Colour doesn’t really exist (a cherry is not really red, a gorilla is not really black, for example) but we nonetheless see colours because the light-sensitive cells at the backs of our eyes interpret different frequencies of light in slightly different ways.
When light of one frequency hits these cells, they send that information into the brain, and a bundle of neurons in the visual cortex then interprets that signal as “red”.
Light of a higher frequency will send a different message into the brain and the interpretation will come back as “blue”, and so on. Colour is just a way for our brains to make a bit more sense of the world around us, otherwise differentiating the things around us would get tricky.
When you see an object in front of you, you are seeing it because the light in the room bounces off it and into your eyes (that existing light in the room is called the “illuminant”).
Your room could be lit in wildly different ways, of course. A bright, sunny room contains lots of frequencies of light bouncing around, whereas a dimly-lit corridor has fewer.
Your brain does a superb job of taking these different environmental conditions into account when working out the real colour of an object. It discards the illuminant light from the scene in front of you, leaving you with the real colours of the objects you’re focusing on (in technical terms, your brain is keeping and interpreting the “reflectant” light from the object).
This mechanism, known as “colour constancy”, is why a red apple looks red whether in bright sunshine or inside a room with fluorescent lights. Your brain is doing an automatic adjustment based on what it knows about the environment around you.
But your brain can only work with the information it is given and, when that information is incomplete, you can “see” the wrong image. For example, it’s difficult to know from the picture of the dress doing the rounds today whether the clothes are in light or shade.
If your brain interprets it as being in shadow, your brain assumes that a certain set of frequencies are the illuminant ones and discards those from the image. If your brain assumes the dress is in bright light, your brain discards different frequencies. The resulting reflectance will be different in each case - white and gold in the first instance; blue and black in the second.
This visual trick can be seen more clearly in the well-known Adelson chessboard illusion.
In this image, squares A and B are identical in colour. But the the shadow and other light cues in the image fool your brain into thinking otherwise. Even when you know that the squares are the same shade of grey, you can’t force yourself to “see” the correct colours.
Another complicating factor in the way we see colour is that we bring expectations to the scene we’re looking at. We all have different internal biases on what constitutes a neutral background, for example, or what constitutes the different light frequencies in a brightly-lit scene and a dimly-lit room.
All of that means that, when individuals look at pictures without any appropriate context, they will tend to see different things.