The color of human skin is primarily determined by the amount and type of a pigment called melanin, which is produced by specialized cells called melanocytes located in the epidermis (outer layer of the skin). The more melanin produced by these cells, the darker the skin will appear. Other factors that can influence skin color include genetics, sun exposure, and certain medical conditions.