Pickler Andrew Dalby responded to one of my recent tweets about not cooking asparagus in lemon juice because it discolours it. He had found that his garlic cloves turned blue when he pickled them in spiced malt vinegar. The discolouration doesn’t mean that the pickles are inedible.
Now plant material turning blue in acid (vinegar is weak acetic acid) is the basis of the litmus test and is more obvious with red cabbage, which shuttles between a deep red colour and a definite blue depending on the acidity. So, I assumed that was perhaps what was happening with the garlic, but couldn’t think what would be colourless in unpickled garlic that might go blue-green in acid.
A quick Google turned up this page in which they report that the most common pigment, anthocyanins, are colourless in raw garlic, can be red at high pH, but are blue-green at low pH. So, that might be it.
But, scientists have also homed in on amino acids as possible villains for giving garlic the pickled blues. J Cho of the College of Agriculture and Life Sciences at Seoul National University in Korea suggests that green discolouration arises as a combination of amino acids that are yellow and blue in the presence of thiosulfinates released enzymically from the garlic to give an overall green hue.
This overturns earlier research that suggested just one blue pigment was to blame and instead suggests that eight are involved: thiosulfinates of free glycine, arginine, lysine, serine, alanine, aspartic acid, asparagine, glutamic acid, and tyrosine.
Cho J., Lee E.J., Yoo K.S., Lee S.K. & Patil B.S. (2009). Identification of Candidate Amino Acids Involved in the Formation of Blue Pigments in Crushed Garlic Cloves (L.) , Journal of Food Science, 74 (1) C11-C16. DOI: 10.1111/j.1750-3841.2008.00986.x
Instructables had a Q&A on the issue back in 2011, but had presumably overlooked this research. This is probably not the end of the story as yet more research papers come up in PubMed.