Avian ketocarotenoid pigments occur in both the red retinal oil droplets that contribute to colour vision and bright red coloration used in signalling. Turtles are the only other tetrapods with red retinal oil droplets, and some also display red carotenoid-based coloration. Recently, the CYP2J19 gene was strongly implicated in ketocarotenoid synthesis in birds. Here, we investigate CYP2J19 evolution in relation to colour vision and red coloration in reptiles using genomic and expression data. We show that turtles, but not crocodiles or lepidosaurs, possess a CYP2J19 orthologue, which arose via gene duplication before turtles and archosaurs split, and which is strongly and specifically expressed in the ketocarotenoid-containing retina and red integument. We infer that CYP2J19 initially functioned in colour vision in archelosaurs and conclude that red ketocarotenoid-based coloration evolved independently in birds and turtles via gene regulatory changes of CYP2J19 Our results suggest that red oil droplets contributed to colour vision in dinosaurs and pterosaurs.We thank the BBSRC Doctoral Training Partnerships (to H.T.) for funding.This is the author accepted manuscript. The final version is available from Royal Society Publishing via http://dx.doi.org/10.1098/rspb.2016.120