Melanin (Greek μέλας, black) is a class of com- pounds that serves as a pigment. The most common form of biological melanin is eumelanin, a brown-black polymer of dihydroxyindole carboxylic acid, and their reduced forms.
Another common form of melanin is pheomelanin, a of benzothiazine units largely responsible for red hair and freckles. The increased production of melanin in human skin is called melanogenesis. It is stimulated by the DNA damages that are caused by UVB-radiation.
Eumelanin is found in hair and skin, and colors hair grey, black, yellow, and brown. In humans, it is more abundant in peoples with dark skin.
Pheomelanin is also found in hair and skin and is found in lighter skinned people.m Pheomelanin is also extremely carcinogenic when exposed to the ultraviolet rays of the sun. (Link)