Melanin is the pigment found in skin, hair and the iris of the eye. It provides these with colour.
The pigment is produced in melanocytes on exposure to UV rays from sunlight, causing the skin to tan in order to protect the skin from damage. Melanocytes are found between the dermis and the epidermis in skin. The more active they are, the more pigment will be made and the darker the skin will appear. 
There are three types of melanin: eumelanin, phaeomelanin and neuromelanin.The first causes brown colours and the most known, the second is responsible for reddish colours and neuromelanin is found in the parts of the brain. 
- ↑ https://www.nlm.nih.gov/medlineplus/ency/article/002256.htm
- ↑ http://www.cancerresearchuk.org/about-cancer/type/melanoma/about/the-skin-and-melanoma
- ↑ http://palaeo.gly.bris.ac.uk/melanosomes/melanin.html