Right across the bird and animal kingdoms, the colour red is used for communication, often to attract mates, and zebra finches are no different: the males have a distinctive red beak, which is a sexually selected trait - as females prefer males with redder beaks.

New research on zebra finches has identified for the first time the genes that allow some bird species to produce the red pigment that plays such a critical role in attraction and mating.

The genes belong to a wider family of genes that also play an important role in detoxification, suggesting how heightened redness may be a sign of mate quality: it indicates a bird's ability to cleanse harmful substances from its body.

This could explain what's known as 'honest signaling': where an evolved trait is a genuine sign of better, fitter genes - in this case the ability to better deal with anything toxic.

The research is published today in the journal Current Biology.

Birds such as the zebra finch obtain yellow pigments, known as carotenoids, from their diet of seeds, or insects in the case of other bird species.

Prior to the latest findings, it was known that such birds must have a way of converting these yellow dietary pigments into the red pigments - the ketocarotenoids - that colour the beaks, feathers or bare skin of many species. However, the mechanism for this process was unclear.

Nick Mundy from Cambridge's Department of Zoology, along with colleagues including Staffan Andersson from the University of Gothenburg and Jessica Stapley from the University of Sheffield, compared the gene sequences of wild, red-beaked zebra finches with captive finches that had a mutant, recessive gene causing yellow beaks.

They identified a cluster of three genes in the wild finches that were either missing or mutated in this genetic region in the 'yellowbeak' birds.

These genes encode enzymes called cytochrome P450s, which play an important role in breaking down and metabolising toxic compounds, primarily in the liver of vertebrates. In humans, these enzymes are well-studied, as they are strongly associated with drug metabolism.

"It was known that birds have an unusual ability to synthesize red ketocarotenoids from the yellow carotenoids that they obtain in their diet, but the enzyme, gene or genes, and anatomical location have been obscure," said Mundy. "Our findings fill this gap and open up many future avenues for research on the evolution and ecology of red coloration in birds."

Red colour in birds is thought to signal individual genetic quality, and the researchers argue that one way it can do this is if the amount of red colour relates to other beneficial physiological processes, such as detoxification.

"Our results, which link a detoxification gene to carotenoid metabolism, shed new light on this old hypothesis about the honesty of signalling," said co-author Staffan Andersson.

The researchers found the specific expression of one or more of the identified 'red' gene cluster in the tissues where the red pigments were deposited: the beak, the tarsus in the bird's feet - as well as in the retina.

The structure of retinas in the eye includes cone-shaped photoreceptor cells. Unlike mammals, avian retinal cones contain a range of brightly-coloured oil droplets, including green, yellow and red. These oil droplets allow birds to see many more colours than mammals.

Mundy says that the newly-discovered genetic links between red beaks and feathers and the internal red retina droplets suggest that producing red pigment evolved for colour vision before it developed a function for external display - as, while red oil eye droplets are ubiquitous across bird species, external reds are only patchily distributed.

"It was quite a surprise that the same genes are involved both in seeing red colours and making red coloration," said Mundy.

Mundy says he and his colleagues are now working on the genetics of red coloration in African widowbirds and bishops, which show "spectacular differences among different species."