Love that effect. Basically has to do with how our eyes and brain are wired to eachother. The brain is constantly trying to fill in gaps left by the eyes, to point that if it interprets an image for long enough, it thinks it should still be there, even when looking away from that image, hence the after image.
The colour is a different effect. Our eyes send signals to the brain that are not only inverted vertically, but with inverted colours as well. It's actually the brain that interprets these colours as those that we "see", and applies its own colour scheme to what we see, instead of what the eyes tell the brain we're seeing.
Science!