Does vitamin D affect melanin concentration?
Darker skin, as opposed to common belief, probably did not develop as cancer protection. Cancer is usually something that attacks the body in a subsequent life. Even pale individuals under the sun are likely to survive far beyond their reproductive era before they are wiped off by skin cancer.

Instead, it is believed that folic acid manufacturing is the highest selection pressure causing darker skin. Folic acid (vitamin B9) which is used all over the flesh, especially during pregnancy and childhood, will decompose in sunlight.

So the skin tone tries to discover the ideal equilibrium between vitamin D and minimal folic acid breakdown.

As a consequence, if you genuinely have enough vitamin D in your diet, there is no need for lighter skin (and further proof for the vitamin-d hypothesis). That is why the Inuit have lighter skin than expected for their extreme location: the intake of vitamin D is large, so the folic acid part of the equation "wins" and pale skin is not preferable. This is why Inuit individuals do not need so much sun. 

Source: 

scienceline.org/2007/06/ask-dricoll-inuiteskimos/

pnas.org/content/107/Supplement_2/8962