I commonly use a technique when caramelizing onions, in which I add the sliced onions to a pan with salt, oil, and water. The water softens the onions and helps cook them evenly such that by the time it all boils away, they caramelize quickly and evenly.
I decided to use this technique on garlic the other day, when making a garlic and oil sauce for pasta, and was surprised to find that the garlic turned a fairly vivid shade of purple!
What happened? Was it some reaction the garlic had to the boiling? Or could it have been a reaction with the cast iron pan I was using?