Selection for different hair color could be a byproduct of other, more consequential genetic changes. One idea is that light-skin genes helped ancient humans survive in Northern Europe's low-light conditions, and light hair may have been a byproduct.

A genetic mutation that codes for the blond hair of Northern Europeans has been identified.

The single mutation was found in a long gene sequence called KIT ligand (KITLG) and is present in about one-third of Northern Europeans. People with these genes could have platinum blond, dirty blond or even dark brown hair.

"There's a half dozen different chromosome regions that influence hair color," said study co-author David Kingsley, an evolutionary biologist at the Howard Hughes Medical Institute and Stanford University in California. "This is one, but not the only one. The combination of variants that you have at all those different genes — that sets your final hair color." [Top 10 Things That Make Humans Special]

Fish colors

Kingsley's team first encountered the gene about seven years ago, when they noticed that stickleback fish color ranged from dark to light depending on the type of water they inhabited. It turned out that a change in one base pair, or letter, in the KITLG gene was responsible.

The gene codes for a protein known as KIT ligand, which binds to receptors throughout the body and affects pigmentation, blood cells, nerve cells in the gut, and sex cells.

A broken KITLG gene would be disastrous for an individual, Kingsley told Live Science.

"You'd have white hair and be sterile, because your gonads hadn't developed properly — and actually, you'd be dead, because blood cells didn't do what they're supposed to do in the bone marrow," he said.

Yet the mutation also seemed to be linked to normal variations in hair color. In population studies, blonds in Iceland were much more likely than brunettes to have the genetic variant.

Color thermostat

Kingsley and his colleagues wanted to know how a mutation in an essential protein could alter hair color without resulting in other harmful effects.

To find out, they experimented on mice. The team identified the gene regions associated with blond hair in human DNA, and then removed those segments of code and tagged them with a gene that coded for a fluorescent-blue hue.

When they inserted the tagged gene into mice, the blue glow appeared only in the hair follicles. That indicated that the gene mutation was activated only in hair.

When inserted into mice, the human blond hair mutation also gave mice lighter coat colors than the brunette version of the gene.

It turned out that this tiny tweak of just one letter in the genetic code didn't change the structure or function of the protein. Instead, it acted like a tiny thermostat, subtly ramping up or down the production of pigment in the hair follicle and nowhere else, Kingsley told Live Science.

The study convincingly ties the gene to hair color, Hopi Hoekstra, a geneticist at Harvard University who was not involved in the study, told Live Science in an email.

"The study is rigorous, elegant and airtight," she said.

Gentlemen prefer blondes?

From an evolutionary perspective, the range in human hair color is a puzzle, Hoekstra said.

Selection for different hair color could be a byproduct of other, more consequential genetic changes, she said. For instance, light-skin genes may have helped ancient humans survive in the low-light conditions of Northern Europe by enabling their skin to make more vitamin D, and light hair may have been an accidental consequence.

Sexual selection could also have allowed blond hair to spread.

"Lots of children have light hair — it's a color that's associated with youth," which may make blond hair more alluring, Kingsley said.

Or, given the relatively low prevalence of blond hair, the gene may have been subject to frequency dependent selection — meaning that golden tresses provided an edge in luring partners as long as they remained relatively uncommon.

"It may have been a celebrated trait because it was rare," Kingsley said.

Of course, blond hair could also have provided no evolutionary advantage, and simply persisted by random chance, he said.

The blond gene was detailed June 1 in the journal Nature Genetics.

Follow Tia Ghose on Twitter and Google+. Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.