The phenomenon you are referring to is color constancy: The apparent hue of a reflective surface remains constant even when changes in the spectral power distribution of the illuminant alter the wavelengths reflected from it (Mather, 2008). In other words, despite substantial changes in illumination, we usually experience the color of an object as being constant.
The spectrum of wavelengths that enter our eyes is jointly determined by 1) the spectrum of the illuminating source (a variable), and 2) The spectral reflectance properties of the object (a constant).
To achieve color constancy, an object's spectral reflectance is the constant color parameter that needs to be evaluated.
Any information that better characterizes an object's spectral reflectance is a cue to colour constancy. This includes (Mather, 2008):
- Local color contrast. Cone excitation levels of one surface relative to another remains constant when both surfaces experience the same change in illumination. Relative cone excitation levels are invariant ratios useful for achieving colour constancy.
- Color adaptation. Adaptation reduces the contribution from the source illumination by lowering activity in the most highly active cone classes.
- Global contrast. Global spectral changes generally represent changes in the illuminant; localised differences usually correspond to reflectance differences.
- Luminance highlights. Glossy surfaces offer near-perfect reflections of the illuminant, which can then be factored from the rest of the scene.
- Mutual reflections. The pattern of reflections that arise from different surfaces, under the same illumination, carries valuable information about the reflectance properties of each surface.
- Range of reflected spectrum. This gives an indication of the breadth of the illuminating spectrum.
A graphical example of the effect of lighting conditions is found below (Fig. 1.)

Bowl of fruit photographed under artificial daylight (left), hazy day light (middle) and clear blue skies (right. Source: Mather (2008)
The most powerful cue to constancy is thought to be local color contrast (Mather, 2008). In other words, the relative contribution of the different cone classes stays constant, despite differences in the spectrum of the illuminant.
In your example, the object (paper) is not represented by a reflectance, but as an image; a representation taken out of its context, and it will appear yellow. Even if the ambient lighting is the same, as in your example, the monitor displays a 'real' yellow color, which has a different spectrum, because it is not a reflectance, but it is generated by a light source: your monitor; as mentioned in the excellent comment of @AMR. The real sheet of paper will have a different reflectance spectrum. Hence, both photo and real sheet will be interpreted as a function of ambient lighting by your visual system and they will appear different.
Even when your image was printed as a photo, the color is obviously different from the white sheet of paper. So the ambient light has a different effect on the reflectance spectrum of the photo and the real sheet.
Also the global contrast is different: the photo with a different spectral content than the real sheet is re-placed into the context of ambient lighting. Hence, the photo it is out of context and will be re-interpreted.
Reference
- Mather, Foundations of perception and sensation 2nd ed. Psychology Press 2008