Earlier this year, scientists used zebra finches to pinpoint the gene that enables birds to produce and display the colour red.

Now, a new study shows the same 'red gene' is also found in turtles, which share an ancient common ancestor with birds. Both share a common ancestor with dinosaurs.

The gene, called CYP2J19, allows birds and turtles to convert the yellow pigments in their diets into red, which they then use to heighten colour vision in the red spectrum through droplets of red oil in their retinas.

Birds and turtles are the only existing tetrapods, or land vertebrates, to have these red retinal oil droplets. In some birds and a few turtle species, red pigment produced by the gene is also used for external display: red beaks and feathers, or the red neck patches and rims of shells seen in species such as the painted turtle.

The scientists mined the genetic data of various bird and reptile species to reconstruct an evolutionary history of the CYP2J19 gene, and found that it dated back hundreds of millions of years in the ancient archelosaur genetic line – the ancestral lineage of turtles, birds and dinosaurs.

The findings, published today in the journal Proceedings of the Royal Society B, provide evidence that the 'red gene' originated around 250 million years ago, predating the split of the turtle lineage from the archosaur line, and runs right the way through turtle and bird evolution.

Scientists say that, as dinosaurs split from this lineage after turtles, and were closely related to birds, this strongly suggests that they would have carried the CYP2J19 gene, and had the enhanced 'red vision' from the red retinal oil.

This may have even resulted in some dinosaurs producing bright red pigment for display purposes as well as colour vision, as seen in some birds and turtles today, although researchers say this is more speculative.

"These findings are evidence that the red gene originated in the archelosaur lineage to produce red for colour vision, and was much later independently deployed in both birds and turtles to be displayed in the red feathers and shells of some species, going from seeing red to being red," says senior author Dr Nick Mundy, from the University of Cambridge's Department of Zoology.

"This external redness was often sexually selected as an 'honest signal' of genuine high quality in a mate," he says.

The previous research in zebra finches showed a possible link between red beaks and the ability to break down toxins in the body, suggesting external redness signals physiological quality, and there is some evidence that colouration in red-eared terrapins is also linked to honest signalling.

"The excellent red spectrum vision provided by the CYP2J19 gene would help female birds and turtles pick the brightest red males," says Hanlu Twyman, the PhD student who is lead author on the work.

The structure of retinas in the eye includes cone-shaped photoreceptor cells. Unlike mammals, avian and turtle retinal cones contain a range of brightly-coloured oil droplets, including green, yellow and red.

These oil droplets function in a similar way to filters on a camera lens. "By filtering the incoming light, the oil droplets lead to greater separation of the range of wavelengths that each cone responds to, creating much better colour sensitivity," explains Mundy.

"Humans can distinguish between some shades of red such as scarlet and crimson. However, birds and turtles can see a host of intermediate reds between these two shades, for example. Our work suggests that dinosaurs would have also had this ability to see a wide spectrum of redness," he says.

Over hundreds of millennia of evolution, the CYP2J19 gene was independently deployed to generate the red pigments in the external displays of some bird species and a few turtle species. The scientists say their data indicate that co-option of CYP2J19 for red colouration in dinosaurs would also have been possible.

The ancestral lineage that led to scaly lizards and snakes split from the archosaur line before turtles, and, as the findings suggest, before the origin of the red gene. These reptiles either lack retinal oil droplets, or have yellow and green but not red.

However, the crocodilian lineage split from the archelosaur line after turtles, yet crocodiles appear to have lost the CYP2J19 gene, and have no oil droplets of any colour in their retinal cones.

Mundy says there is some evidence that oil droplets were lost from the retinas of species that were nocturnal for long periods of their genetic past, and that this hypothesis fits for mammals and snakes, and may also be the case with crocodiles.