If you've got a cold, there's a good chance you've got snot dripping from your nose. And if you honk your nose into a tissue, it will probably fill up with slime-green goo. What's up with that?
Typically, nasal mucus is clear and thin, and its main job is to filter air as you suck it in through your nostrils. But during an infection, mucus can change to a yellow or green color as a result of how your body is trying to fight off the bacteirial or viral infection.
The green color comes from a chemical secreted by white blood cells -- specifically, the heme group in the iron-containing enzyme myeloperoxidase -- to kill pathogens.
In the case of a bacterial infection, the bacteria become trapped and breed in pre-existing mucus, which turns yellow-green as the white blood cells go to work.
During a viral infection, such as the common cold or flu, the first and last stage of the infection cause the production of clear, thin mucus in the nose and back of the throat. As the immune system begins to attack the infection, the mucus thickens and may turn yellow or green.
Bacterial infections can be fought with antibiotics, but viral infections cannot. Most often, allowing the body sufficent time to do its thing is the best way to clear a viral infection, so your best bet for dealing with all the green snot is to stock up on tissues.