Except for blueberries, blue raspberry candies, and certain drinks, you don't want your food to be blue.
Blue garlic, like a poison frog's striking markings, raises eyebrows.
I first saw blue-ish garlic in a sous-vide experiment, although it's more prevalent in pickling. A sulfur-containing amino acid and an enzyme generate the blue color.
Chopping, mincing, and crushing garlic exposes these two chemicals, giving garlic its strong taste and scent.
Allicin interacts with amino acids in garlic to form pyrroles when coupled with an acid. Polypyrroles produce colors from connected pyrroles. Four pyrroles form green. Three pyrroles make blue.
Garlic may change color when exposed to copper, aluminum, iron, and tin. Minerals might originate from metal pots or pans or water trace minerals.