The secret behind the ghost catfish's iridescent twinkle has been uncovered by a team of scientists.

Kryptopterus vitreolus casts ethereal, flickering rainbows along its flanks when it shimmies through water. This eye-catching sheen within its otherwise glass-like body makes the Thai native a popular choice among aquarium owners worldwide.

It also caught the attention of Qibin Zhao, a physicist at China's Shanghai Jiao Tong University, when he was wandering through an aquarium store. So like any curious scientist, he decided to study it.

(Qibin Zhao/ Shanghai Jiao Tong University)

In nature, dancing rainbows known as iridescence are often caused by textures on the surfaces of body parts like scales, wings, or feathers. White light hits these surfaces and is scattered upon reflection, interfering with itself in ways that emphasize different wavelengths.

The ghost catfish, however, allows 90 percent of light to pass straight through its body. It also doesn't have any scales, and its skin is extremely thin (around 20 micrometers). This makes reflected scattering from its skin or scales unlikely to be responsible for a rainbow effect; something else must be at work.

With lead author Shanghai Jiao Tong University materials scientist Xiujun Fan, Zhao and his colleagues dissected the fish to separate the skin from the muscles on the back and belly.

A white laser passed straight through the skin without much scattering. The muscles were a different story. Something in them caused the light waves to ripple in what's known as diffraction, creating a rainbow effect.

Each muscle is made up of elastic units called sarcomeres. Using electron scanning microscopy and optical microscopes, the team found these fibrous units were acting like diffraction gratings, splitting the beam of light into a rainbow as it passed through the structure.

The shifting angles of the moving fish creates changing angles with which the light hits the muscles, causing the colors diffracting through them to blink through a rainbow.

Other fish have the same type of muscle, but the shine cannot be seen externally because their skin isn't transparent, the researchers said.

This iridescent shimmer could have evolved in ghost catfish as a form of camouflage so they could avoid predators, the researchers hypothesized.

The ghost catfish isn't completely invisible; it still creates a shadow in the water that predators can hunt. This shadow could be concealed by throwing out distracting rainbow colors that mimic the diffraction patterns of sunlight on water.

"It is also possible that the ghost catfish may use the fast-changing colors as signals for communication since we find the fish to be a very social species," the researchers said.

This paper was published in Proceedings of the National Academy of Sciences.