A hydrangea bought from the same nursery, the same variety tag and everything, can turn out blue in one garden and pink in another. It isn't a mislabelled plant or a fluke of the season. It's the soil the roots are sitting in, and specifically, how much aluminium that soil makes available to the plant.
Mophead and lacecap hydrangeas (Hydrangea macrophylla, the common garden types) carry a pigment in their petals that changes colour depending on whether it's bound to aluminium. The plant itself doesn't manufacture blue or pink directly. It takes up aluminium through its roots, and if enough of it reaches the flower, the pigment shifts towards blue. If little or none reaches the flower, the same pigment reads as pink.
Whether aluminium is available to the roots at all comes down to soil pH, not how much aluminium the soil actually contains. Aluminium is common in most soils, but it needs acidic conditions to dissolve into a form roots can absorb. Below about pH 5.5, aluminium becomes soluble and the plant takes it up freely, producing blue flowers. Above about pH 6.5, the soil locks aluminium into forms the roots can't use, and the same plant flowers pink. In between, a garden often gets a muddier mix of the two, sometimes on the same bush.
This is why gardeners can deliberately shift a hydrangea's colour by changing the soil rather than the plant. Adding aluminium sulphate or garden sulphur acidifies the soil and pushes flowers towards blue. Adding garden lime raises the pH and pushes them towards pink. Neither works overnight. The colour change depends on new root growth taking up aluminium under the new soil conditions, not an instant reaction in the flower itself, so it typically takes a full season or more to see the shift through, and results are more reliable on new growth than on flowers already open.
White hydrangea varieties are the exception, and no amount of soil treatment will turn one blue or pink. They don't carry the pigment that aluminium binds to in the first place, so there's no colour for the soil chemistry to act on.
White hydrangea varieties are the exception, and no amount of soil treatment will turn one blue or pink.
This is also why the same variety can look different across New Zealand gardens with no deliberate intervention at all. Some North Island clay and volcanic soils trend naturally acidic, which is why unsprayed hydrangeas in those areas often lean blue. Parts of Canterbury sit on more alkaline, limestone-influenced soils, which tends to push the same varieties towards pink. None of this changes how the plant should otherwise be grown: hydrangeas want a shady or partial-shade spot, since full sun makes flowers fade faster and can scorch the leaves on hot days, and they need consistently moist soil through summer since they wilt quickly in the heat.