Why are people dark skinned in hotter areas despite dark colour absorbing the most heat? I’m not sure if the reason is in the field of biology or more towards physics but as my reasoning is based on the physics part being that perfectly black bodies are perfect absorbers of heat and light while white is a perfect reflector but we have darker skinned humans near equator and lighter skinned people (as well as animals like polar bears) near the poles, I’ve posted it on physics stackexchange. Also, if the answer is based on the biology of animals and this should belong to biology stack exchange, feel free to let me know.
 A: The skin color is due to the skin pigment melanin which absorbs and thus protects the skin against the damaging UV-radiation of the sun. The other side of the coin is that UV-radiation of the sun also produces the vitamin D in the skin which is essential for bone development and growth and also the immune system.  Originally, all humans resided in Africa and were dark skinned for sun protection. When some humans migrated to higher latitudes in Europe and Asia, they encountered much less sunshine, especially in winter, so that they had a problem in getting enough vitamin D for survival. Thus in their evolutionary development they lost large part of the pigment melanin and became light skinned like Europeans and east Asians are. This is the usual explanation for skin color. It is interesting that this happened only about 40 000 years ago.
A: This is a bio question. 
The biggest threat to fitness is not lack of cooling, but damage from UV rays. A pigment in black (actually all skin to differing degrees) absorbs the UV so that skin cells don't. 
Fair skinned people, from higher latitudes, have another risk to their fitness which is a lack of vitamin D which is produced by the skin when exposed to UV. 
As a result of this, fair skinned people in the tropics get more skin cancer than otherwise, and dark people are more likely to have a vitamin D deficiency if far from the tropics. 
