Here's a reply I got from another forum:
"In northern China, aged fresh garlic is left in vinegar for a week to make an “intentionally intensely green” Laba garlic pickle traditionally served with New Year’s dumplings. Aged garlic is saturated with a chemical that turns garlic green when released by the acetic acid in the vinegar. The pigment itself turns out to be a close chemical relative of chlorophyll, which gives all green leaves their color.
The color change in garlic and garlic-onion blends is created, by the same handful of sulfur compounds and enzymes that give the allium family its unique pungent flavors. Under the right conditions, these chemicals react with each other and with common amino acids to make pyrroles, clusters of carbon-nitrogen rings. Essentially, these rings absorb different wavelengths of light and may appear green or blue, depending on their structure. To eliminate the blue hue of an onion-garlic blend, simply raise the heat in the pan—it will turna more acceptable pinkish-brown...
~~sourced from my cultural pickling book~~"