Amending soil pH to change the color of hydrangea flowers
Although it is true that soil $\mathrm{pH}$ plays a role in the color of hydrangeas, the presence of aluminium is actually what determines the flower color. Aluminium is a naturally occurring mineral that is found in most  soils, however, just because a mineral is in the soil doesn’t mean the plant is absorbing this mineral. This is where soil $\mathrm{pH}$ comes into play – plants are able to absorb aluminium when the soil $\mathrm{pH}$ is between 4.5 and 5.8 with the best range being between 5.0 and 5.5. When the $\mathrm{pH}$ moves to 6.0 and above then the plants will not be able to absorb the aluminium despite it being present in the soil.

Adding either sulfur or magnesium sulfate (epsom salt) to the soil will lower the $\mathrm{pH}$, but this will not help with the presence of aluminium in the soil, which is why many aluminium sulfate is so highly recommended.

This is not to say that magnesium sulfate would not be helpful in other ways, however, as magnesium is the central atom of pigment chlorophyll, which will help to improve the foliage quality of your hydrangea.