Turkeys’ heads change color to express their emotions. Berkeley scientists have used this adaptation to create a biosensor for germs, toxins, and TNT.

It turns out turkeys aren’t only great with gravy and cranberry sauce. Scientists have long drawn inspiration from nature, and the humble turkey wattle is their next muse.

Turkeys can change the color of the skin on their heads from red to blue to white, depending on whether they are calm or excited. This characteristic is so distinctive that it’s earned turkeys the name “seven-faced bird” in Korean.

In a new study released today in Nature Communications, a research team at the University of California, Berkeley, led by Seung-Wuk Lee, explains how they have developed a synthetic toxin sensor based on the turkey’s color-changing technique.

A turkey’s head is normally bright red, a color caused by visible blood vessels lying directly under the skin of the wattle. The blood vessels are surrounded by long bands of a connective tissue called collagen, which is one of the basic building blocks of animal life. When the turkey gets flustered, the blood vessels contract, exposing more of the collagen bands.

Learn How Sunlight Damages Your Skin’s Collagen »

This changes the way that incoming light scatters and reflects off of the turkey’s skin, causing it to appear blue or white. It’s the same scattering effect that makes the sky appear blue but sunsets yellow or red. It’s also the reason that blood vessels appear blue beneath pale skin, even though the blood inside them is red.

“If we can build a similar structure and use the resulting structure to detect chemical or environmental information, it can be a great color sensor that we can easily use in our daily life,” said Lee, an associate professor in bioengineering at Berkeley, in an interview with Healthline.

To create their sensor, Lee’s team needed a building block of their own. They chose the M13 virus, which can stick to itself in a simple, repeating pattern that forms fibers. “The M13 virus has a physical shape like a natural building block and can easily produce identical copies,” explained Lee.

These fibers, it turns out, have properties similar to collagen. They can expand or contract to change color, shifting from blue to green to yellow to red. As luck would have it, the fibers are naturally responsive to a range of chemical vapors, including water and alcohol.

“The color change is so obvious for the high-vapor chemicals, we can easily detect color changes even with the naked eye,” said Lee.

Read About a New Sensor That Screens Your Blood for Drugs in Real Time »

Lee’s team developed a smartphone app called iColour Sensor, which uses a phone camera to read the color changes and detect just how much of the measured chemical is present in the air.

The sensor isn’t limited to just water and alcohol. To demonstrate the flexibility of their invention, Lee’s team bioengineered the M13 virus to contain a site that is sensitive to the chemical explosive TNT. When exposed to TNT fumes, the fibers expanded rapidly, turning from dark blue to yellow or red.

The test was also quite selective—the team tried their TNT-sensitive test on two related but non-explosive chemicals, DNT and MNT. The iColour Sensor was able to easily tell the difference between the dangerous chemical and the harmless ones.

Although the test isn’t quite sensitive enough to be useful for detecting TNT in the military field, Lee is confident that it is a good proof-of-concept test. He says the viral fibers could potentially be bioengineered to contain sites that are sensitive to any number of toxins and microbes.

Color-coded chemical detectors are easier and faster to read than sensors that just display a numerical readout. Most chemical detectors are also expensive to manufacture and are only sensitive to a small number of chemicals. Lee’s technology is cheap, fast-acting, and could be customized to nearly any chemical.

And we have turkeys to thank.

“Nature provides a rich source of inspiration,” said Lee. “All the natural products that we see are an example of [winning adaptations for] their given environments. Only a fraction of them are discovered and utilized for scientific and engineering subjects. There are a lot of remarkable structures and phenomena that are still waiting to be discovered.”

Read More: A Gold & DNA Cocktail Can Rapidly Screen for Malaria and Other Diseases »