Our world is filled with fascinating animals with very distinctive body parts, behinds included. Many animals across the planet have evolved fascinating rear ends, which often double up as defensive weaponry or mating tools.

Baboons have their distinctive pink rumps that swell up during mating season; manatees use their butts as flotation devices and giraffes use theirs as pillows.

But the flashiest bottom of them all belongs to the male Australian peacock spider, which has evolved a behind that diffracts light to produce a rainbow coloured disco ball-like light show on their butts that could make the early Elton John jealous.

These tiny spiders that measure only 5 millimeters (0.2 inches) long, use their backsides to produce a dazzling display of colors. Male peacock spiders use sunlight to produce a spectacular light show that has all the colors of the rainbow to attract females to mate. Scientists are calling this fancy show "nature's smallest rainbow."

According to a paper published online in the journal Nature Communications, this is the only instance in the animal kingdom where a creature uses rainbow colors to attract mates.

An international team of researchers from the United States, Belgium, The Netherlands and Australia has found the mechanism of how two species of peacock spiders — Maratus robinsoni and Maratus chrysomelas — create this fantastic display, and they say that it could one day help better instruments used in space missions!

Using various research methods, the team found that the origin of this intense rainbow iridescence was the specialized abdominal scales of the spiders. These scales have an airfoil-like microscopic 3D contours with nanoscale diffraction grating structures on the surface.

"M. robinsoni and M. chrysomelas have two types of visually distinct abdominal scales: rainbow-iridescent scales and velvet black scales," the researchers wrote in the paper. "These scales show strikingly different morphologies: The black scales are brush-like and randomly oriented, while the rainbow-iridescent scales are more orderly aligned, cling to the cuticle surface and have bulky 3D shapes."

Upon close inspection, the team found that each of these bulky, iridescent scales contains a series of three-dimensional, parallel grates used to split different wavelengths of light at different angles.

The interaction between the surface nano-diffraction grating and the microscopic curvature of the scales enabled the separation and isolation of light into its component wavelengths to create intricate angles at much smaller distances than are possible even with current engineering technologies.

Using 3D printing, the team tried to recreate the scales based on the same pattern seen on the spiders' abdomen.

“As an engineer, what I found fascinating about these spider structural colors is how these long evolved complex structures can still outperform human engineering,” said Radwanul Hasan Siddique, a postdoctoral scholar at Caltech and study co-author in a press release on UC San Diego website. “Even with high-end fabrication techniques, we could not replicate the exact structures. I wonder how the spiders assemble these fancy structural patterns in the first place!”

“Who knew that such a small critter would create such an intense iridescence using extremely sophisticated mechanisms that will inspire optical engineers,” said Dimitri Deheyn, Hsuing’s advisor at Scripps Oceanography and a coauthor of the study.

The mechanism behind these tiny rainbows could inspire new color technology by helping scientists overcome current limitations in spectral manipulation, and to reduce the size of optical spectrometers for applications where fine-scale spectral resolution is required in a very small package, notably on instruments on space missions, or wearable chemical detection systems.