Hair color depends on different pigments in the cortex. As we grow older, pigment gradually stops being produced, resulting in gray or white hair.