The sources of melanin are specialized cells, called melanocytes, found in the bottom layer of the epidermis, the base of hairs, the inner ear, the eye's iris and other locations. The synthesis of melanin in the skin is controlled by the pituitary gland, which releases a hormone that stimulates it.
Melanin is the dark pigment found in human skin and hair, as well as in the tissues of many other animals. The pigment is produced by melanocytes oxidizing the amino acid tyrosine and then bonding several of these oxidized molecules together into large polymers. There are three types of melanin: Eumelanin is either brown or black, pheomelanin is red in color and is the pigment most responsible for red hair. Neuromelanin is the third type of melanin. It is found only in the brain, and its function is unknown as of 2015.
Melanin is produced in the skin to absorb light and prevent damage to cells. Melanin can absorb the vast majority of ultraviolet light that encounters it. Various conditions can cause an abnormal level of melanin, however. Albinism is a disorder where the melanocytes produce little to no melanin, resulting in very pale skin and hair. Birthmarks are an example of localized overproduction of melanin.