Melanin is the brown pigment that is secreted by melanocytes, a type of cell in your skin. The type, combination of types, and amount of melanin determine your skin color, both naturally and with sun exposure. Freckles and moles are caused by high localized concentrations of melanin, for example.
Pigment coloration is also found in human hair, skin, and eye color. Pigment color can be a dark brown to black color. Melanin's function is to protect the skin and other structures from UV radiation.
Melanin are natural pigments found in almost all organisms. It is produced by oxidation of amino acids and there are 3 types; eumelanin, pheomelanin, and neuromelanin.