White skin, black skin or intermediate shade … The different skin colors of humans are an adaptation to the differences in intensity of ultraviolet rays according to regions of the world. Ultraviolet radiation is stronger in Africa than in Europe or North America, for example. So, it makes sense that people from different countries have different skin types and colors. However modern man moves around the world a lot, which has muddied the waters: from now on, people of various ethnic origins are found in all latitudes.
The more melanin pigments, the darker it is.
Conversely, the less melanin, the lighter the skin becomes.
Darker skin provides better protection against cell damage caused by intense sunlight.