The brain is using spectral information of light waves (their wavelength mix) to aid in the identification of objects. This works because any given object will absorb some wavelengths of the light source (the illuminant) and reflect others. For instance, plants look green because they absorb short and long wavelengths, but reflect wavelengths in the middle of the visible spectrum. In that sense, plants – that perform photosynthesis to meet their energy needs – are ineffective solar panels: They don’t absorb all wavelengths of the visible spectrum. If they did, they would be black. So this information is valuable, as it allows the brain to infer object identity and help with image parsing: Different but adjacent objects usually have different reflectance properties and profiles. But this task is complicated by the fact that the mix of wavelengths reflected off an object is dependent on the wavelength mix emanating from the light source in the first place. In other words, the brain needs to take the illumination into account when determining object color. Otherwise, object identity would not be constant – the same object would look different depending on the illumination source. Illumination sources can contain dramatically different wavelength-mixes, e.g. incandescent light with most of the energy in the long wavelenghts vs. cool light LEDs with a peak in the short wavelengths. This is not a recent problem due to the invention of artificial lighting. Throughout the day, the spectral content of daylight changes – e.g. the spectral content of sunlight is different midday from late afternoon. If color perceiving organisms didn’t take this into account, the same object would look a radically different color at different times of day. So such organisms need to discount the illuminant, as illustrated here:
The details of how this process happens physiologically are still being worked out, but we do know that it happens. Of course, there are also other factors going into the constant color correction of the image performed by the organism. For instance, if you know the “true color” of an object, this will largely override other considerations. Try illuminating strawberries with a green laser pointer. The light bouncing off the strawberries will contain little to no long wavelengths, but the strawberries will still look red to you because you know that strawberries are red. Regardless of these considerations, we do know that color constancy matters quite a bit, even in terms of assumed illumination in case of #thedress, when the illumination source is ill-defined:
Of course, things might not be as straightforward as that. It won’t always be perfectly clear what the illuminant is. In that case, the brain will make assumptions to disambiguate. A fair assumption would be that it is like the kind of illuminant one has seen most. In most of human history – and perhaps even today – that means sunlight. In other words, humans could be expected to assume illumination along the daylight axis (over the day), which means short-wavelength illumination, which could account for the fact that most people did report to see the dress as white and gold.