An oft-cited anecdote in support of the vitamin D hypothesis is that Arctic populations whose skin is relatively dark given their latitude, such as the Inuit and the Lapp, have had a diet that is historically rich in vitamin D. Sensitivity of modern humans to vitamin D deficiency is evident from the widespread occurrence of rickets in 19th-century industrial Europe, but whether dark-skinned humans migrating to polar latitudes tens or hundreds of thousands of years ago experienced similar problems is open to question. In any case, a risk for vitamin D deficiency can only explain selection for light skin. Among several mechanisms suggested to provide a selective advantage for dark skin in conditions of high UV irradiation (Loomis 1967; Robins 1991; Jablonski and Chaplin 2000), the most tenable are protection from sunburn and skin cancer due to the physical barrier imposed by epidermal melanin. Dark skin
All modern humans share a common ancestor who lived around 200,000 years ago in Africa. Comparisons between known skin pigmentation genes in chimpanzees and modern Africans show that dark skin evolved along with the loss of body hair about 1.2 million years ago and that this common ancestor had dark skin. Investigations into dark-skinned populations in South Asia and Melanesia indicate that skin pigmentation in these populations is due to the preservation of this ancestral state and not due to new variations on a previously lightened population. MC1R
The melanocortin 1 receptor (MC1R) gene is primarily responsible for determining whether pheomelanin and eumelanin are produced in the human body.
Tanning involves not just the increased melanin production in response to UV radiation but the thickening of the top layer of the epidermis, the stratum corneum.A persons natural skin color affects their reaction to exposure to the sun. Generally, those who start out with darker skin color and more melanin have better abilities to tan. Individuals with very light skin and albinos have no ability to tan. The biggest differences resulting from sun exposure are visible in individuals who start out with moderately pigmented brown skin: the change is dramatically visible as tan lines, where parts of the skin which tanned are delineated from unexposed skin.Modern lifestyles and mobility have created mismatch between skin color and environment for many individuals. Vitamin D deficiencies and UVR overexposure are concerns for many. It is important for these people individually to adjust their diet and lifestyle according to their skin color, the environment they live in, and the time of year. For practical purposes, such as exposure time for sun tanning, six skin types are distinguished following Fitzpatrick (1975), listed in order of decreasing lightness:

Fitzpatrick scale
The following list shows the six categories of the Fitzpatrick scale in relation to the 36 categories of the older von Luschan scale:
Dark skin with large concentrations of melanin protects against ultraviolet light and skin cancers; light-skinned people have about a tenfold greater risk of dying from skin cancer, compared with dark-skinned persons, under equal sunlight exposure.