Thanks for writing in to Healthcare Magic!
The hydrocele scrotum
gets more pigmented in long standing cases due to the local irritation caused by pressure generated by rubbing at cloths.
The treatment is to debulk the swelling through a repeat surgery.
Use undergarments which provide firm support and keep the scrotum least mobile in them.
You can use depigmenting creams locally to reduce the darkness of the pigmentation.
If you have any further query please let me know I would try to answer it for you.
Wish you a great health!