Secret codes and hidden messages aren’t just for computer security experts or kids passing notes in class -- animals use them too. The telltale red hourglass of the black widow spider sends a warning signal that some animals can see but others cannot, finds a Duke University study.

Considered some of the most venomous spiders in the world, black widows are notorious for their toxic bite. The red hourglass-shaped mark on the female’s underside warns would-be predators such as birds to stay away, unless they want their next meal to be their last.

But how do black widows broadcast their built-in chemical weapons to birds, without blowing their cover with their insect prey? The spider’s balancing act works thanks to differences in how birds and insects see color, finds a study that appeared online Feb. 27 in Behavioral Ecology.

First the researchers tested whether birds responded differently to models of black widows with red hourglass markings than those without. They placed plastic fake spiders produced by 3-D printing onto bird feeders to see how birds would respond.

The template for the spider mannequins came from a 3-D image of a black widow designed for video game developers. “Video game developers love to put black widows in their games because they’re scary,” said lead author Nicholas Brandley, now a visiting assistant professor at Colorado College.

Half of the eight fake spiders were painted all black, and half were painted black with a red hourglass to match the reflectance of real black widows. The spider models were placed one at a time, belly-up, at seven backyard bird feeders in Durham, North Carolina.

Models with a red hourglass were less attractive to birds looking for a snack. Birds were three times less likely to peck or grab a spider model with a red hourglass than one without, the researchers found.

Small, short-beaked birds such as house finches and chickadees were more easily spooked. “The birds would see a spider model with red markings and get startled and jump back, like ‘Oh no man, get me out of here,’” Brandley said.

Next they estimated how the specific red and black hues used by black widows appear to birds compared to how they might be seen by insects such as crickets, beetles and ants, which black widows catch in their sticky webs.

Insects and birds are sensitive to different wavelengths of light. Bird eyes have a photoreceptor for long wavelengths of light that that most insects lack.

“Insects can still detect red light, but not as well as mammals or birds,” Brandley said.

The researchers used an instrument called a spectroradiometer to objectively measure the wavelengths reflected by two of the three black widow species found in North America. Then they calculated how much of that light the photoreceptors in the eyes of birds and insects would be able to absorb.

The researchers discovered that black widows’ warning colors are more visible to birds than insects. The color contrast is more than two times greater for birds, Brandley said.

The researchers suspected that differences in viewing angle play a role, too. Black widows usually hang underneath their horizontal webs with their bellies facing the sky. This puts their red hourglass in full view of birds flying overhead but partially hidden from insects crawling below.

To test the idea, the researchers did an experiment where they let two species of North American black widows build webs in 20-inch-tall cages in the lab over the course of three days. The species that preferred to build its web furthest from the ground -- thus visible to birds hunting from above or below -- also happens to be the only North American black widow with red marks on its back in addition to its belly, they found.

Most studies of animal warning colors focus on how well they deter potential predators, but far fewer have examined whether the same signals help their bearers avoid detection by parasites, prey, or competitors, the researchers say.

“Potential eavesdroppers may be an underappreciated force shaping these signals,” Brandley said.

This research was supported by Duke University.

CITATION: "Aposematic Signals in North American Black Widows are More Conspicuous to Predators Than to Prey," Nicholas Brandley, Matthew Johnson and Sönke Johnsen. Behavioral Ecology, Online Feb. 27, 2016. DOI: 10.1093/beheco/arw014