With their big eyes, flashy colors, and slick dance moves, peacock spiders are arguably the most charismatic arachnids on the planet.

But for males, having swagger and looking good isn’t just social capital—it’s a matter of life and death.

When it’s time for one of these eight-legged suitors to woo a mate, he tries to impress her with an intricate combination of spiderly dancing and drumming, which often involves shaking his very flashy, colorful butt. If he manages to impress the female with his moves, he gets to make more adorable peacock spiders. But if she’s not exactly into him? He could find himself on the wrong end of her fangs.

Now, scientists are decoding the complex secret behind the peacock spiders’ brightly colored rears.

One peacock spider that lives in Australia, Maratus splendens, sports coloration that looks a little bit like a red bull’s-eye printed on iridescent blue. The species is legitimately itsy-bitsy—only about four millimeters long, or way smaller than your pinky nail. But that didn’t stop the University of Groningen’s Doekele Stavenga from zooming in to study the spiders’ colorful scales. (See “Adorable New Peacock Spiders Will Rock Your World.”)

Earlier, Stavenga had investigated the biophysical mechanisms behind patterns on butterfly wings, the colors of flowers, and the feathers of the parotia bird—which, he says, behaves in a way that’s remarkably similar to M. splendens.

“Understanding the physical constraints of color production provides insight into the possibilities and constraints in life. It provides a key for evolutionary studies,” Doekele says. “It was logical to want to decipher the workings of spider scales.”

Masters of Light

Turns out, those scales (or modified hairs) on M. splendens use two different mechanisms to generate hues, Doekele and his colleagues reported on August 10 in the Journal of the Royal Society Interface. One mechanism uses pigments to produce colors, as humans and flowers do; the reds, whites, and creams on M. splendens are the result of those pigments, which exist in barbed scales that help scatter light.

But the blue? That’s cooked by a completely different recipe. Here, the spiders rely on arrays of tiny nanostructures that reflect light of particular wavelengths. In this case, that wavelength corresponds to a shiny, sometimes violety blue. These nanostructures are embedded in flat, convex, sac-like scales, and the whole apparatus amplifies the reflected light. Altogether, it’s a peculiar arrangement of nanothings that scientists have never seen before in any animal.

“In life, the bright blue of this species is particularly intense,” says David Hill, who publishes the journal Peckhamia, which is dedicated to all things jumping spider-related, a group that includes the springy peacock spiders. “Photographs cannot do justice to the iridescent effect.”

Unlike pigments, which can fade over time, undamaged structural colors never lose their sheen. That’s why beetles, butterfly wings, and bird feathers stored in museum drawers still shine after decades. Curiously, it appears that the majority of animals make blue using structures rather than pigments, and M. splendens is no exception (the same is not true for plants, which easily make blue pigments).

“We’ve known for some time that butterflies and moths are doing all sorts of really clever things with manipulating the behavior of light with their scales,” says Nathan Morehouse of the University of Pittsburgh.

“What we’re discovering with this study and others is that spiders—which are obviously a very different group of animals—are also playing with light.”

True Colors

Can female M. splendens even see the colors her suitor is waving at her? If not, spending all that energy making such brilliant colors is for naught, assuming that’s the reason those colors exist. (Read “Female Peacock Spiders Underwhelmed By Disco-Dancing Suitors.”)

Morehouse suspects the answer is yes. Recent work from his lab preliminarily suggests that spiders of a related species, Maratus volans, have four different photoreceptors in their two big, beautiful principal eyes, making them what are known as tetrachromats. In comparison, most humans have three (we’re trichromatic), dogs and cats have two, and some butterflies have five.

That makes Maratus somewhat odd among spiders, many of which aren’t really known for having fantastic color vision (one reason why blue tarantulas are such a conundrum).

“We have very good evidence that these animals can see these colors. It would be no surprise for them to see blue, but the twist is that they can see—well, we think they can see—the red,” Morehouse says.

Female Maratus, therefore, could not only easily perceive the differences between red, blue, green, and ultraviolet—but also resolve the male’s intricate designs. (See “New ‘Blue Face’ Peacock Spider Is Fancy Dancer.”)

“We know of no animals that can see as much detail as these can up close,” Peckhamia’s Hill says. “Vertebrates have a higher visual acuity, but are much larger and form images at greater distances. The patterns observed at distances of about one centimeter [0.4 inch] by these small creatures can only be resolved by us when we magnify them with cameras or microscopes.”

All that, packed into one tiny, tap-dancing arachnid.