system
Given the following post, respond as if you're commenting on Reddit:
human
Melanin protects from the sun, but does this extra melanin in your skin come at the cost of anything else? Is there any advantages to being paler?
gpt
Being paler helps with vitamin D synthesis.  

That's not to say darker skinned people can't synthesize vitamin D, but paler skin lets you do more with less sun.

The basic theory is people started off in places with more sun, and so had darker skin.  As they moved away to places that got less sun, they evolved paler skin, that let them get the necessary vitamin D synthesis done in less time.