Melanogenesis
Through a process called melanogenesis, these cells produce melanin, which is a pigment found in the skin, eyes, and hair. This melanogenesis leads to a long-lasting pigmentation, which is in contrast to the pigmentation that originates from oxidation of already-existing melanin.
There are both basal and activated levels of melanogenesis; in general, lighter-skinned people have low basal levels of melanogenesis. Exposure to UV-B radiation causes an increased melanogenesis. The purpose of the melanogenesis is to protect the hypodermis, the layer under the skin, from the UV-B light that can damage it (DNA photodamage). The color of the melanin is dark and it absorbs all the UV-B light and it blocks it from passing the skin layer.
Since the action spectrum of sunburn and melanogenesis are virtually identical, they are assumed to be induced by the same mechanism. The agreement of the action spectrum with the absorption spectrum of DNA points towards the formation of cyclobutane pyrimidine dimers (CPDs) - direct DNA damage.
Typically, between 1000 and 2000 melanocytes per square millimeter of skin are found. Melanocytes comprise from 5% to 10% of the cells in the basal layer of epidermis. Although their size can vary, melanocytes are typically 7 μm in length.
The difference in skin color between lightly and darkly pigmented individuals is due not to the number (quantity) of melanocytes in their skin, but to the melanocytes' level of activity (quantity and relative amounts of eumelanin and pheomelanin). This process is under hormonal control, including the MSH and ACTH peptides that are produced from the precursor proopiomelanocortin.
Albinos lack an enzyme called tyrosinase. Tyrosinase is required for melanocytes to produce melanin from the amino acid tyrosine.
Read more about this topic: Pigment Cells