Melanin is a type of pigment that gives color to the eyes, skin, and hair. The amount of melanin in the iris, the colored part of the eye, determines what color a person's eyes will be, says Douglas Fredrick, M.D., a pediatric ophthalmologist at Stanford Children's Health in Palo Alto, California.