If I go into a green room (all walls are semitransparent and green) and spend some time - around 10+ min - in there, when I come out all my eyes see is white as pink. I see no (or very few other) colors due to this for a while - around 2 minutes. What is the science behind this? Why do eyes lose color perception in this case?
To explain the neurophysiological background to the existing answers I would like to add the following:
The effect you are describing (pinkish appearance of white) is generally referred to as a negative after image and it is a direct reflection of the color opponency in the retina. The effect is caused by adaptation of the (in this case green) cones in the retina. This adaptation occurs through photobleaching, which means that the chromophore (cis-retinal) in the visual pigment in the cones is converted to the inactive state (trans-retinal). The conversion of retinal forms the basis of the detection of photons by the cones. When you look at a green stimulus for a long time, the photopigment in the green cones is progressively converted to the inactive trans-retinal state and the green cones will stop responding to the green light stimulus. Why then does this lead to a pink'ish (magenta) perception of white? This is because color vision is based on color opponency.
The visual system in the retina is based on three cones: red, green and blue cones.
These cones feed into three channels: a red-green, a yellow-blue and an achromatic (luminance) channel. Note that yellow is formed by adding the red-green color signal, while the achromatic channel is formed by adding the red and green cones as well, where only light intensity information is extracted.
The red-green and yellow-blue channels are opponent channels. For your specific example, the latter is important. Red-green opponency means that at the neural level, red responses cancel green responses and vice versa. Therefore, we are not able to perceive a "reddish green". White is perceived when light activates all cones, such that red cancels green, green cancels red and yellow cancels blue.
However, if the green cone system is adapted due to the green pigment being bleached, the opponency of green is diminished and the red response will dominate. In addition, as the yellow channel will be reduced as well, there will be a bit of blue added as well due to reduced blue suppression, explaining the pink'ish (i.e., magenta) appearance you describe. A nice example of the negative after-effect is the following:
Stare at the colored dots on the girl's nose in the negative photo image below for 30 seconds. Then look at a white surface and start blinking. You should see a non-negative image of the girl (see here for image source).
Reference on the opponency model: Mather, Foundations of Perception, chapter 12 Colour Vision.
First recall that pink is white minus green, more or less. Now, your perception can be explained by adaptation: Neurons try to control their gain (amplification factor) to have roughly the same range of output. So if there's a lot of stimuli they like, they will reduce their gain, and vice versa. It can be thought of as a form of fast time-scale homeostasis in this case.
While you were in the green room, your neurons that represent 'green' gets less sensitive to green stimuli due to strong green input (adaptation). Additionally, the 'non-green' representing neurons become more sensitive, since there's less visual stimuli that they like. When you suddenly come out of that room, now the green neurons do not respond as strongly as the non-green neurons in response to white, hence your perception of pink.
The shift in color is caused by the proteins in your photoreceptors being used up and thus no longer being able to absorb the light.
If you stare at a green wall, you're using up green sensing proteins. When you switch to a white wall you're now seeing more red and blue compared to green, and thus it appears pinkish.
Your brain somewhat tricks you into thinking that the green you're seeing is the same was it was when you first looked at it, but you're actually sensing less of it the longer you look.