Melasma is a condition that stems from both internal and external dynamics.
People who have this condition are often genetically predisposed to it.
Their skin will produce high levels of melanin in response to hormonal changes like pregnancy.
And sun exposure also plays a part. Melanin is also secreted as a way to protect the skin from harmful UV rays. But it will be secreted in much higher quantities in those with the genetic predisposition.