A small feathered dinosaur whose fossil was discovered in China used its different colours for protection, a study published Thursday said, helping to dispel stereotypes about the long-extinct creatures.

"Far from all being the lumbering prehistoric grey beasts of past children's books, at least some dinosaurs showed sophisticated colour patterns to hide from and confuse predators, just like today's animals," said Fiann Smithwick, an author of the study published in the journal Current Biology.

By reconstructing the colours of the animal, which lived 130 million years ago, the researchers from Britain's University of Bristol determined that it had multiple types of camouflage.

This probably helped it from being devoured in a world filled with much larger meat-eating dinosaurs, including relatives of the infamous Tyrannosaurus Rex.

The dinosaur Smithwick and his colleagues studied is called Sinosauropteryx. Scientists discovered its fossil about a dozen years ago.

The researchers mapped how dark pigmented feathers were distributed across the body and revealed some distinctive colour patterns. These patterns can also be seen in modern animals where they serve as different types of camouflage.

The patterns include a dark stripe around the eye which helps modern birds to hide their eyes from would-be predators.

A striped tail may have been used to confuse both predators and prey, the researchers said.

"Dinosaurs might be weird in our eyes, but their colour patterns very much resemble modern counterparts," said Jakob Vinther, the study's senior author.