Myriad animals don the brilliant shifting hues of iridescence, making them stunning to marvel at, but why natural selection so widely favored such structural colors has been somewhat of a mystery.

Shifting metallic sheens have evolved independently many times across the animal kingdom, from dazzling hummingbirds to skinks shining in rainbow to jewel-like flies. In some animals, where the iridescence is more prominent in one sex than the other – as in peacocks – sexual selection has clearly played a role.

But in many insects, both sexes are equally iridescent, and some animals are only iridescent in their larval forms, like the groundsel bush beetles (Trirhabda bacharidis). A new study has provided experimental evidence that the color shifts may also serve a protective function in these animals.

"One of the challenges when studying the functions of such highly reflective structural coloration has been to separate the effects of the changeability of colors, the hallmark of iridescence, from the effects of simply having multiple colors at the same time," explains University of Bristol evolutionary biologist Karin Kjernsmo. "And also to separate the effects of gloss from the effects of iridescence."

To achieve this, Kjernsmo and colleagues set up an experiment where they tested young chickens with different "prey" in the form of real and artificial jewel beetle (Sternocera aequisignata) wing cases with a tasty mealworm snack inside.

The chicks, who had never encountered such prey items before, were presented with wing cases that were either matte with a static gradient, glossy with a static gradient, matte with shifting hues, or glossing with shifting hues.

The birds did not hesitate to attack the "prey" that displayed multiple colors at once. But they thought twice about going for the "prey" whose color shifted iridescently. Gloss also induced a hesitation alone, but not as strong as the color shifts. As they had no previous experience with iridescence, this behavior was instinctive.

"Here we have, for the first time, effectively managed to test for each of these two effects on their own and shown that both iridescence and gloss can protect prey even post-detection, providing yet another adaptive explanation for the evolution and widespread existence of iridescence," says Kjernsmo.

In 2020, the same team provided evidence that iridescence may be an effective form of camouflage, even though that might seem counterintuitive given how startlingly attractive some of the brilliant structural colors can be.

"This idea is actually really old, but it has never been shown before. I think it has just been neglected or forgotten," Kjernsmo told Discover magazine in 2020.

Of course, these results would need to be demonstrated in natural conditions to confirm and ensure there's nothing else confounding the results in the laboratory setting.

"Our results are important because they demonstrate that even when prey are presented up close and against a mismatching background, iridescence may confer a survival benefit by inducing hesitation or even, as sometimes observed, an aversion response in attacking birds," Kjernsmo and the team wrote in their paper.

They explain this aversion may be due to a form of aposematism – when animals use colors to advertise their poisonous nature. A 2017 study on an iridescent alpine leaf beetle (Oreina cacaliae), with known chemical defenses, demonstrated that glossiness enhances its warning signal, supporting the poisonous warning idea.

"Future studies could establish the frequency with which the combination of iridescence and secondary defenses occurs," the researchers of the 2022 study suggest.

Their research was published in Animal Behaviour.