Anthocyanins are responsible for the color and they act as a pH indicator, changing color from bright red in acid to bright blue in basic solutions. Soil acidity could have an impact on their color at harvest, but it also really depends on how you use them. If you put them raw in a salad, they'll probably turn quite red regardless, but it's also quite common to find them as a purple color.