Melanocytes are pigment-producing cells that rest in the bottom layer of the epidermis. They are responsible for the secretion of the pigment melanin, which is the main, dark-brown pigment in skin, eye, and hair tissue. The human epidermis contains in the order of 1,500 melanocytes per square millimeter of skin. This figure is constant across human races. The activity level, and not the number, of melanocytes accounts for the observed differences in flesh pigmentation between people whose ancestors hail from differing climates.
There are two important functions to having differing levels of melanocyte activity. The first has to do with overall skin tone and its effects on the consumption of UV rays and Vitamin D. Melanin blocks the absorption of both of these substances from the sun, and in heavily sun-exposed environments, such as Africa, it is advantageous to have darker, more sun-blocking skin. This is because UV rays are damaging to the epidermis. In the intense sunlight of Africa, dark skin offers protection from UV radiation while failing to block all of the more positive Vitamin D from being absorbed because the light is so direct and ubiquitous. In cooler, darker climates, such as Europe, a different advantage emerges. European days (and those of similar climates) do not pose anything like the level of UV-based threat that African days present. Consequently, melanin production is less necessary as a protective measure against solar radiation in those latitudes. In addition, low-sunlight environments often produce just enough Vitamin D for humans to avoid rickets, so it is actually quite advantageous for melanocytes to slow production considerably when living in such climates. The result of this is the current observed global racial distribution. Areas with high sunlight have produced darker people than areas with low sunlight.
The other important function of variable melanocyte activity in considerably more immediate than the above factor, which occurs on an evolutionary timescale. This is the concept of tanning. Regardless of the environment one is built to live in, it is possible to encounter more or less sunlight than is normal. If a European-descended individual goes to Africa or just stays out in the sun more than normal, that person will temporarily experience an increase in melanocyte activity, producing a tan. If someone is deprived of sunlight their body will respond by shutting down melanocyte activity, rendering them paler than usual. This is an important adjustment process that regulates the amount of damage and deficiency that the human body is subject to on a day-to-day basis.
Melanocytes are humanity’s main defense against both solar radiation and disease-causing Vitamin D deficiency. They are complex structures, constantly adjusting their performance, over the course of both generations and hours, to maintain a healthy interaction with the radiation of our sun.