The ghostly images that you see here are called afterimages. An afterimage is an image that stays with you even after you have stopped looking at the object.
The lining at the back of your eye, called the retina, is covered with light-sensitive cells called rods and cones. Rods let you see in dim light, but only in shades of gray. Cones, however, detect color in bright light, and each of the three types of cones is sensitive to a particular range of color.
When you stare at the red bird, the image falls on one region of your retina. The red-sensitive cells in that region adapt to the exposure to red light and reduce their response.
The white board reflects red, blue, and green light to your eyes because white light is made up of all these colors. When you suddenly shift your gaze to the white board with the birdcage, the adapted red-sensitive cells don’t respond to the reflected red light, but the blue-sensitive and green-sensitive cones respond strongly to the reflected blue and green light. As a result, where the red-sensitive cells don’t respond, you see a bluish-green bird. This bluish-green color is called cyan.
When you stare at the green bird, your green-sensitive cones become adapted to the unchanging stimulus. Then, when you look at the white board, your eyes respond only to the reflected red and blue light, and you see a reddish-blue, or magenta, bird.
Similarly, when you stare at a blue object, the blue-sensitive cones adapt, and the reflected red and green light combine to form yellow.