A small two-legged dinosaur had orange and white rings around its tail, researchers say, the first time the colour of a dinosaur's feathers has been determined.
The British, Irish and Chinese scientists also found that an early crow-sized bird had patches of white, black and reddish feathers.
The paleontologists looked at the fossils of the metre-long dinosaur Sinosauropteryx and the early bird Confuciusornis to find clues on the colour of the animals' bristles and feathers.
Sinosauropteryx had short orange and white bristles, which are considered the evolutionary precursors of feathers, down its back and up its tail. The bristles are structurally similar to the short, two-branched feathers of the kiwi.
Confuciusornis was a true bird, with a toothless beak, wings and two long tails.
The fossils of both animals were found in northeast China, and both lived in the early Cretaceous period between 131 million and 120 million years ago.
The colours were not visible in the fossil remains, but tiny structures called melanosomes, which carry the feathers' pigment, were preserved.
The shape of the melanosomes offers a clue to their colour: in modern birds and mammals, sausage-shaped melanosomes carry black and grey pigments and spherical ones carry orange and brown colours.
The scientists used a scanning electron microscope to find the fossilized remains of the small colour-containing bodies.
Some of the feather fossils contained no evidence of melanosomes and were probably white.
Besides allowing illustrators and movie makers a more accurate depiction of dinosaurs, the research on feather colours gives insight on the origin of feathers, the scientists said.
The debate is over whether features originated for flight, for warmth or for display, said Mike Benton of the University of Bristol.
"We now know that feathers came before wings, so feathers did not originate as flight structures," Benton said in a statement.
"Furthermore, we now know that the simplest feathers in dinosaurs such as Sinosauropteryx were only present over limited parts of its body — for example, as a crest down the midline of the back and round the tail — and so they would have had only a limited function in thermoregulation," he said.
"We therefore suggest that feathers first arose as agents for colour display and only later in their evolutionary history did they become useful for flight and insulation," said Benton.
The research was published this week in the journal Nature.