The pigment, melanin is responsible for hair color. Variations of this pigment give people different hues in their hair. For example, eumelanin gives people black or brown hair whereas another pigment called pheomelanin results in a reddish tinge of the hair.
The type and amount of melanin content in hair is governed by multiple genes. Although not much is known about these genes, MC1R gene in humans encodes for a protein called melanocortin 1 receptor which is involved in the melanin production pathway. This receptor determines the type of melanin produced by melanocytes.