Parrots boast some of the most vibrant and varied colour palettes in the animal world — and it seems they have quantum physics to thank.

Key points: Some birds get red and yellow feather pigments from their diet

Some birds get red and yellow feather pigments from their diet Parrots are different: their feather colours don't rely on pigments derived from food

Parrots are different: their feather colours don't rely on pigments derived from food Laser analysis shows the same pigment molecules can turn a parrot's feathers yellow or red, depending on their arrangement

New Zealand research published today in the Royal Society Open Science journal found a parrot's red feathers contain the same pigment molecules used to make yellow feathers — just arranged differently.

Unlike other birds, parrots don't rely on what they eat to colour their feathers red, orange and yellow.

Instead, they get their warm hues from a particular group of pigments called "psittacofulvins", said Monash University ornithologist Kaspar Delhey, who wasn't involved in the study.

But exactly how these special pigments do their job has been a bit of mystery.

Shine a light on parrot feathers (literally)

For the new study, the researchers, led by University of Otago physical chemist Jonathan Barnsley, got hold of a multicoloured tail feather from a yellow-naped amazon parrot (Amazona auropalliata).

They looked at its yellow and red patches using a technique called Raman spectroscopy, which takes advantage of the fact molecules vibrate when illuminated by laser light.

"Each molecule can have a number of different vibrations which make up a signature 'chord' and we detect that," Mr Barnsley said.

"This vibration information tells us what the molecules are and what they're up to in the sample."

In Raman spectroscopy, molecules vibrate when bathed in laser light, and this tells chemists about how they are arranged. ( Supplied: Jonathan Barnsley )

They found both yellow and red patches contained the same type of psittacofulvin pigment molecule — one that usually bestows a yellow hue.

What differed, though, was how the molecules were arranged.

In the yellow patch, pigment molecules appeared to be separated. But in the red, they were snuggled up close.

So how does the closer arrangement of yellow pigment molecules turn a feather red?

Here we enter the gnarly world of quantum physics. If you move molecules closer or further apart, what's called the "energy gap" also changes.

This gap affects what wavelengths of light are absorbed and reflected or transmitted — and changes the colour we see.

Evolutionary conundrum

That parrots can create colour by arranging molecules poses an interesting evolutionary question, Dr Delhey said.

In other birds, reds and yellows are created by pigments called carotenoids which come from food.

The classic example is the flamingo, which gets its pink blush from its diet of shrimp and algae.

Flamingos' feathers, legs and face are coloured by their food, which is rich in carotenoid pigments. ( Pixabay: allyartist )

"If you can eat a lot of food that has those pigments, and you can put them in your feathers," Dr Delhey said.

This could have an evolutionary advantage, he added, as more vibrant colour might demonstrate the bird is a good forager, for instance, and be more attractive to the opposite sex.

But given parrots create vibrant colours independent of diet, this raises the question: why bother with the colours at all?

"Parrots are interesting because they're one of the most colourful groups and we don't know why," Dr Delhey said.

During his work, Mr Barnsley also noticed some parrot species' feathers absorbed ultraviolet light, which is invisible to us, and re-emitted it as visible coloured light — known as fluorescence.

How and why this happens is a mystery, but he suspects this quirk also hinges on pigment arrangement.

Still, we'll soon know how widespread this pigment trick is in parrots. Mr Barnsley is giving other parrot species the Raman spectroscopy treatment.

And in the meantime, materials scientists could pick up a few tricks from our feathered friends.

Instead of designing new expensive molecules, they might find new ways to "tune" and reorganise simpler, cheaper materials.

"Nature starts with simple materials and, through interactions, results in some really complex materials," Mr Barnsley said.

"I think we can learn a lot from that."