Hair color is determined by the pigment melanin responsible for skin and eye color. Hair color is based on the ratio and amount of melanin in a person's hair.