Colour-changing Hydrangeas and relative pH

The Hydrangea is a new plant to me, and I think that it’s beautiful. I never saw one until I moved East. They puzzle me. My father-in-law informs me that the colour of the flowers depends on the pH of the soil. How is this possible?

I don’t doubt his word, because I’ve seen the different colours and he’s explained to me how to change the relative pH one way (lime, but I can’t remember how to change it the other way), but I just want to know why it happens.

Thank you!

Any type of acidity will make them blue, but Aluminium Sulphate is generally recommended. I couldn’t find a whole lot about why, but look for ‘hydrangea’ in this link for what I could find.

http://www.bmi.net/roseguy/redshoot.html

Anthocyanins. Works for me. Thank you!

The plot of a mystery story I once read involved a hydrangea bush changing color because a gun was buried under it.