Peacock feathers are renowned for their distinctive metallic shimmer, but few realize these hues are produced by tiny structures that scatter light, rather than pigmentation. The phenomenon is responsible for the vivid blues and greens of peacock plumage, as well as the iridescent coloring of butterfly wings and other animals.

In the past, scientists have struggled to replicate these structural, or natural, colors, but a study conducted by the University of Cambridge and Dutch biotech company Hoekmine BV suggests the process is about to become much simpler.

Atlas Obscura’s Christina Ayele Djossa reports that the researchers discovered a replicable genetic code for natural colors, meaning that the unique shades can now be grown within a 24-hour period. Previously, replication of the colors required an electron beam and weeks to complete.

"It is crucial to map the genes responsible for the structural coloration for further understanding of how nanostructures are engineered in nature," study co-author Villads Egede Johansen says in a press release. "This is the first systematic study of the genes underpinning structural colors—only in bacteria but in any living system."

According to the release, the team’s project, which focused on the genetic manipulation of flavobacterium, could lead to the mass production of biodegradable, non-toxic paints in all the colors of nature.

Based on their internal nanostructures, flavobacterium colonies naturally reflect a metallic green color. As New Atlas’ Michael Irving explains, the scientists wanted to determine which genes were responsible for producing this structural color. The team created colonies with specific mutations—like varied size and locomotion—and compared them to a control group of bacteria. The mutated specimens, they realized, reflected different colors based on their inner structure.

Johansen, an expert in bio-inspired photonics, tells Djossa that the rod-shaped bacteria measure about half a micrometer in diameter.

“The colony pack in an orderly fashion like a pile of tubes or cylinders,” he says. So by changing the sizes and dimensions of the flavobacterium, the team could induce colors from the entire spectrum. Researchers were also able to dull these colors or eliminate them entirely. Djossa reports that colors not on the spectrum, such as white and brown, were harder to engineer but may be reflected by changing the angle of the bacterium​.

Moving forward, the scientists hope to explore the possibility of harvesting flavobacteria for large-scale production of non-toxic paints that are “grown” rather than manufactured.

"We see a potential in the use of such bacterial colonies as photonic pigments that can be readily optimized for changing coloration under external stimuli and that can interface with other living tissues, thereby adapting to variable environments,” study co-author Silvia Vignolini says in a statement. “The future is open for biodegradable paints on our cars and walls–simply by growing exactly the color and appearance we want.”