When it is in the stem it can be a S-deficiency or "overall nutrient deficiency."
It could also just be genetics. I'd expect the petioles to turn purple too if this is the case. when leaf stems only turn puprle at top, that's when i lean toward "odd LED phenomenom" that nobody has ever reversed course that i've seen -- but this doesn't account for the red stems. I've had one go a fairly dark puprle, but the leaves were healthy and happy and the plant produced, so all was well in my book. chalked it up to genetics.
Cross reference what you can to eliminate possbillities. e.g. i don't see any other coinciding symptoms for S. if in soilless or hydro it'll be much easier to determine if you are high or low on the concentration scale. ratio of nutes is another issue, but again.. plant looks relatively healthy.