You can change or influence the color of hydrangeas. The reason for the color of the hydrangeas is the soil or the PH value of the soil.

The pH of the soil is to blame
It's not magic, it's the pH of the soil. That means: the more acidic the soil is, i.e. the lower the PH value, the bluer the flowers will be. Garden soil usually has a pH of six to seven. However, a PH value of around five would be ideal.
Reduce the PH value with fertilizer
To lower this, you can either use special soil or use fertilizer. The soil is ericaceous soil, which lowers the PH value, giving the plant its blue color back.
If you don't want to replace the entire soil, you can help with fertilizer. This must either contain a lot of aluminum sulphate or you choose one with a lot of potassium but little phosphorus. And the flowers are turning blue again!