Because of our different internal functionalities our bodies react differently to different type of external action.
For example, eating a paracetamol tablet during fever might not provide much relief to a person as much as it does to the other person.
Based on this, we can conclude that being on certain medications can cause a person to develop pigmentation on their skin. In this case, the best way to deal with this is to either stop the medications which have caused pigmentation or just take additional medicines which can be eaten with the existing ones without any major side effect on your bodies.