Scientists have discovered eight genes linked to red hair, helping to solve a mystery of how redheads inherit their flaming locks.
The study - which also sheds light on blondes and brunettes - is the largest genetic study of hair colour to date.
It had been thought that red hair is controlled by a single gene, called MC1R. The new research sheds light on other genes that are involved.
Previous studies had shown that redheads inherit two versions of the MC1R gene that leads to red hair - one from their mum and one from their dad.
Although almost everyone with red hair has two copies of the red-haired version of MC1R, not everyone carrying two red-haired versions is a redhead. Scientists knew there must be other genes involved but these have mostly remained a mystery until now.
Now researchers at the University of Edinburgh have looked at DNA from almost 350,000 people who had taken part in the UK Biobank study. The study focused on people of European descent because they have greater variation in hair colour.
Comparing redheads to people with brown or black hair, they identified eight previously unknown genetic differences that are associated with red hair.
The team also looked at the functions of the genes they identified and found that some of them work by controlling when MC1R is switched on or off.
In addition to the redhead genes, the researchers uncovered differences in almost 200 genes associated with blondes and brunettes.
Scientists say there is a gradient of colour from black, through dark brown to light brown and blonde, which is caused by increasing number of genetic differences in these 200 genes.
The researchers were surprised to find that many of these 200 genetic differences were associated with hair texture rather than pigmentation. Others are involved in determining how the hair grows - whether curly or straight, for example.
The study, published in Nature Communications, was funded by the Medical Research Council and the Biotechnology and Biological Sciences Research Council.
Professor Ian Jackson, of the Medical Research Council Human Genetics Unit at the University of Edinburgh, said: "We were able to use the power of UK Biobank, a huge and unique genetic study of half a million people in Britain, which allowed us to find these effects."
Professor Albert Tenesa, of the University of Edinburgh's Roslin Institute, said: "We are very pleased that this work has unravelled most of the genetic variation contributing to differences in hair colour among people."
Melanie Welham, Executive Chair of the Biotechnology and Biological Sciences Research Council, said: "Once again collaborative research is helping to provide answers to some of life's important questions. BBSRC is pleased to have helped support the largest genetic study of human hair colour. It has provided some fascinating insights into what makes us such distinct individuals."