Lightness constancy is the perceptual phenomenon where the perceived lightness of an object remains constant despite changes in illumination. This allows us to recognize objects under varying lighting conditions by factoring out the effects of shadows and highlights.