Melanin occurs in two primary forms. Eumelanin exists as black and brown, whereas pheomelanin provides a red color. Dark-skinned individuals produce more melanin than those with pale skin. Exposure to the UV rays of the sun or a tanning salon causes melanin to be manufactured and built up in keratinocytes, as sun exposure stimulates keratinocytes to secrete chemicals that stimulate melanocytes.
The accumulation of melanin in keratinocytes results in the darkening of the skin, or a tan. This increased melanin accumulation protects the DNA of epidermal cells from UV ray damage and the breakdown of folic acid, a nutrient necessary for our health and well-being. In contrast, too much melanin can interfere with the production of vitamin D, an important nutrient involved in calcium absorption. Thus, the amount of melanin present in our skin is dependent on a balance between available sunlight and folic acid destruction, and protection from UV radiation and vitamin D production.
It requires about 10 days after initial sun exposure for melanin synthesis to peak, which is why pale-skinned individuals tend to suffer sunburns of the epidermis initially. Dark-skinned individuals can also get sunburns, but are more protected than are pale-skinned individuals. Melanosomes are temporary structures that are eventually destroyed by fusion with lysosomes; this fact, along with melanin-filled keratinocytes in the stratum corneum sloughing off, makes tanning impermanent.
Too much sun exposure can eventually lead to wrinkling due to the destruction of the cellular structure of the skin, and in severe cases, can cause sufficient DNA damage to result in skin cancer. When there is an irregular accumulation of melanocytes in the skin, freckles appear. Moles are larger masses of melanocytes, and although most are benign, they should be monitored for changes that might indicate the presence of cancer.
Source: Anatomy and Physiology, 2013, pp. 188, Openstax https://assets.openstax.org/oscms-prodcms/media/documents/AnatomyandPhysiology-OP.pdf