Hi there ~
I understand your concern. Sometime vigorous sex or masturbation
will make your penile skin darker than usual due to bruising underneath your skin. It will take some time to heal till you get back your original skin color. I believe that you do not need an STD
test if this is the only issue. Please consult a dermatologist
if you feel like this is something that is not getting better or getting worse and you are not comfortable with it although there is no issue with functioning.
I hope this helps. Take care and have a lovely day!