Ignore the trim, and the photo shows a dress that is a pale, washed out blue tint shown silhouetted against bright sunlight coming through the window. It’s possible that it’s a blue dress, washed out in the photo by the bright light, or it is a white dress, shadowed blueish against the surrounding bright yellowy light. Your brain choose one possibility or the other, and corrected accordingly.
What helped me wrap my head around “the dress phenomenon” was watching an animated movie. In a live action movie (or in stop-motion animation), they control the lighting with the use of lights (obviously), but in animation (traditional or computer generated), they create the illusion of different lighting through color choices. Find two photos of the same character in a daylight scene and in a nighttime scene. You’ll find they used darker, bluish-tinted shades of the character’s colors to indicate the character is in darkness or shadow. Unless you consciously think about it, you don’t notice that Woody’s kerchief is now burgundy instead of red, you just perceive it as red but in shadow. Your brain perceives it as the color it thinks it “should be” in normal lighting conditions. That’s what happens with the photo of the dress.
Latest Answers