People who cook garlic have sometimes been alarmed to see their garlic turn green, blue, or turquoise as it cooked. What the hell happened? Bacterial infestation? Poison added by assassins? Actually, it was just chemistry.
I personally have never seen garlic turn blue, but after reading about it I know what I’m going to do this weekend. I’ll get a lot of butter, some fresh onions and garlic, and some lemon. I’ll slice up the garlic and onions slowly, just barely melt the butter in the pan, throw in the garlic, and top the whole thing off with a lot of lemon juice. Then I’ll slowly heat the entire thing up, letting the garlic sweat rather than cook. If that doesn’t turn my garlic interesting colors, nothing will.
These are all the “mistakes” that cooks apparently make that can turn garlic green or blue. It scares the cooks, but it’s the harmless result of two elements meeting in an acidic environment. The sulfur in the garlic (the same stuff that makes your breath smell garlicky after you eat garlic or onions) combines with copper from the lemon juice and butter (in some areas, even the water has dissolved copper). The two elements react with each other, with the help of a few enzymes in the garlic, to make the blue-green color that you’re used to seeing on the surface of old pennies. Heating the stuff quickly or using older garlic to kill the enzymes should inhibit the reaction. Depriving the entire thing of copper will also prevent the discoloration. But whether you like the color or not, it’s perfectly safe to eat.