Human skin color can range from almost black (due to very high concentrations of the dark brown pigment melanin) to nearly colorless (appearing reddish white due to the blood in the skin) in different people. Skin color is determined by the amount and type of melanin, the pigment in the skin. Variation in skin color is largely due to genetics. As a general pattern people with ancestors from tropical regions (hence greater sunlight exposure) have darker skin than people with ancestors from subtropical regions. This is far from a hard and fast rule however, because many light skinned groups have managed to survive at the equator by way of social adaptation. The same can be said of dark skinned groups living at subtropical latitudes.
Melanin comes in two types: pheomelanin (red) and eumelanin (very dark brown). Both amount and type are determined by four to six genes which operate under incomplete dominance. One copy of each of those genes is inherited from each parent. Each gene comes in several alleles, resulting in a great variety of different skin tones.
Dark skin (melanin) protects against ultraviolet light; this light causes mutations in skin cells, which in turn cause skin cancers. Light-skinned persons have about a tenfold greater risk of dying from skin cancer under equal sunlight exposure, with redheads having the greatest risk. Furthermore, dark skin prevents radiation of UV-A rays from destroying the essential folic acid, derived from B vitamins. Folic acid (or folate) is needed for the synthesis of DNA in dividing cells and folate deficiency in pregnant women are associated with birth defects.
While dark skin better preserves vitamin B, it can also lead to vitamin D deficiency at higher latitudes which in turn can cause fatal cancers affecting the colon, lung and prostate. Dark-skinned people are also at higher risk for rickets, cardiovascular disease, diabetes and multiple sclerosis..To address this issue, some countries have programs to ensure fortification of milk with vitamin D.
The advantage of light skin at high latitudes is that it allows more sun absorption, leading to increased production of vitamin D3, necessary for calcium absorption and bone growth. The lighter skin of women at higher latitudes most likely results from the higher calcium needs of women during pregnancy and lactation. However, some have postulated that it may also derive from sexual selection (however this hypothesis more likely derives from current social conditions in which light skinned people set the beauty standard).
Albinism is a condition characterized by the absence of melanin, resulting in very light skin, eyes, and hair; it is caused by an inability to synthesize tyrosine, and has a genetic basis.