Hello,
This purple discoloration could be due to due to trauma due to friction rub with clothes or during masturbation which could have caused breakage of capillaries lying just below the surface.
If it is not causing any pain or itching or any other associated symptom then there is not much to worry about. If there are any such symptoms then an evaluation by a dermatologist will be the best.
Hope it helps.Take care and pls do keep me posted on how you are doing or in case you have any additional doubts.Kind regards.