Why did dinosaurs have feathers millions of years before the first reptiles took to the air?

Paleontologists have been puzzling over that question for years. But now an answer may finally be at hand, thanks to a fascinating new study by researchers at the University of Bonn in Germany.

“Until now, the evolution of feathers was mainly considered to be an adaptation related to flight or to warm-bloodedness,” the study's first author Marie-Claire Koschowitz, a graduate student at the University's Steinmann Institute for Geology, Mineralogy and Paleontology, said in a written statement. “I was never really convinced by any of these theories."

Instead, the study suggests plumage evolved in dinosaurs because its bright coloration facilitated communication and mate selection.

Koschowitz and her team came up with the idea after analyzing genetic similarities between dinosaurs and modern-day reptiles and birds. The analysis led them to hypothesize that dinosaurs had "tetrachromatic" vision -- in other words, they had photo receptors to detect ultraviolet light as well as blue, green, and red.

"If you look at a cladogram (tree of life) for a group of animals for which the relationships are well known and you find a feature that is shared by all of them, it's pretty safe to assume that this feature was present at the base of the tree and kept throughout the evolution of the last common ancestor into the different species," Koschowitz told The Huffington Post. "So I looked at the morphology and general color vision in reptilia and birds and lo and behold, it turned out that tetrachromacy is present in every single branch of todays reptiles."

This means dinosaurs likely used visual signals to communicate with each other, Koschowitz said. Developing large, sheet-like feathers would have resulted in a huge variety of colors and patterns they could use to recognize one another -- and mate.