Comet Lovejoy is still visible in the night sky, so if you get a chance you should check it out. If you have seen it, you might have noticed a distinctly green color to it. That isn’t an optical illusion, because Lovejoy is really green.
Usually when you observe a comet directly, it will appear white, or slightly bluish. The white is due to sunlight reflecting off the dusty tail of the comet, and the blue is from the gas tail of the comet. Photographs can typically reveal these colors in rich detail, compared to the limited color perception of our eyes. But sometimes the gas emitted can have a greenish hue. Many comets have an abundance of compounds such as cyanide (CN2) and carbon (C2). When ionized these compounds emit light in the green spectrum. The light they emit is much brighter than things like hydrogen (even though hydrogen is more common), and that combined with our sensitivity to green light means that a comet can appear green.
Green comets are fairly common, but make for a rare color in the night sky since there are no green stars.