Certain stem cells act as pigment producing cells, so when hair regenerates, some of the stem cells convert into pigment producing cells that color the hair. With age, fewer of these cells are active and the hair loses its ability to produce melanin.