Why does garlic sometimes take on a startling blue color when cooked with an acid?
Blue garlic may look off-putting, but it’s perfectly safe to consume and tastes just fine. The color change is caused by a reaction between enzymes and sulfur-containing amino acids in the garlic (the same enzymes are responsible for garlic’s flavor). When these enzymes are activated by mild acid, they produce blue and green pigments. The compound responsible for this reaction, isoalliin, is formed when garlic is stored at a cool temperature for several weeks, typically in the winter, when pantries are colder.
In short: To avoid discoloration, use fresh, young garlic when making beurre blanc or any recipe that combines garlic with acidic ingredients.