What is melanin? It determines your eye, hair color and more.

Eye color is an important identifier used to describe someone's appearance in media, social interactions, and by state and national databases such as the driver's license division or passport office. It's also a personal trait we associate with our individual identity. Despite the prevalence and importance of this identifier, few people understand the science behind what gives eyes their color.

Eye color is determined by genetics, of course, but the genes associated with eye color are directly connected to the production, use and storage of a pigment called melanin. And the pigment doesn't only determine eye color − it also controls the color and tone "of our skin and hair as well," explains Dustin Portela, DO, a board-certified dermatologist and founder of Treasure Valley Dermatology in Boise, Idaho.

What is melanin?

Melanin is a naturally occurring substance or pigment produced by special skin cells called melanocytes that are found in one's skin, hair follicles, eyes and other parts of the body. While most everyone has the same number of melanocytes, some people produce more melanin than others. The more melanin a person produces, the darker their skin, hair and eyes will be.

In addition to the amount of melanin produced, the type matters, too. There are three basic types of the pigment: eumelanin, pheomelanin and neuromelanin. Eumelanin is responsible for dark colors in skin, eyes and hair, "and is more common in those with black or brown hair and eyes," says Shilpi Khetarpal, MD, a dermatologist at the Cleveland Clinic. She says that pheomelanin contributes to lighter skin tones and hair color and is more common in people with red or blonde hair. While eumelanin and pheomelanin control the colors of such visible characteristics, neuromelanin affects neurons in the brain and plays a role in protection against neurodegenerative disorders such as Parkinson's disease.

What is melanin caused by?

Each type of melanin is "genetically determined," says Khetarpal − with individual levels of melanin being determined by one's race and genes along with environmental and secondary factors.

Portela says such factors include hormone production, aging, the amount of time one is exposed to the sun and specific medical conditions. According to Johns Hopkins Medicine, melanin deficiency or abnormalities lead to certain pigment disorders. These include albinism (albinos) that causes white hair, pale skin and blue eyes; melasma that causes dark patches on one's skin; and vitiligo that causes smooth, white patches on one's skin.

Is having melanin good or bad?

In addition to contributing "to the diversity of the human appearance with varying skin, hair and eye colors," Portela says, melanin serves other important functions. "Having melanin is a good thing and serves as an important adaptation for humans in protecting our skin from the harmful effects of the sun’s UV rays," he says.

He explains that when one's body is exposed to sunlight, "the melanocytes produce more melanin, and that melanin moves into the regular skin cells as it migrates to the surface of the skin." As this happens, it absorbs and disperses the UV radiation which helps to shield the deeper layers of one's skin from potential damage caused by excessive UVA and UVB exposure, including sunburn and skin cancer.

Because of this important protection that melanin provides, people with a genetic loss of the pigment are at a higher risk of developing skin cancer and suffering from sunburn and even blindness. "Melanin production is a complex process that plays an important role in protecting the skin and body," says Portela.

This article originally appeared on USA TODAY: What is melanin? Cause and how it impacts skin, eye and hair color