Early P and long Mg deficiencies causes purple stems, but it can also be done by other conditions and even genetics
Check your tap water EC or PPM (you'll now more or less how many salts come with the water) -discard Mg deficiency
Check the EC and PH of the outlet of the pot (how much nutrients the plant have (with enough accuracy) and the PH to know if they are in range of absortion.
Happy growing mate.