The site of melanin formation is the last layer of the epidermis. This layer is also known as the basal layer. Cells that manufacture melanin are known as melanocytes.
Melanocytes form melanin and bundle it in a package known as a melanosome. Melanosomes are sent to other areas of the skin where they are absorbed and melanin is extracted. Melanin plays a role in protecting the skin against the sun.
There are three types of melanin: eumelanin, pheomelanin and neuromelanin. Eumelanin produces brown and black pigments, while pheomelanin is responsible for pigments seen in red hair and freckles. Neuromelanin's function is largely unknown.