Until about 600 million years ago, seeing colors didn't matter so much to Earth's inhabitants — nobody had eyes.
"Before the eye evolved, you just wouldn't have seen what was there," says Andrew Parker, a biologist at London's Natural History Museum who studies the evolution of color.
Simple animals back then just floated around, he says. They were aware of sunlight, but didn't have any of the biological bits and pieces needed to perceive color. Then, as Parker tells it, something really big happened.
"A predator that could swim quickly evolved vision," he explains.
That predator probably looked something like a big shrimp, and now it had eyeballs — compound eyes, like the ones that flies have. "That's when color kicked off," Parker says.
Suddenly color could serve as a beacon, alerting predators to tasty food. If you were a worm or a juicy slime blob of a thing — like the soft-bodied ancestors of shrimp or beetles that bobbed about back then — and you stuck out in the murk because you just happened to be yellow or red, you'd be lunch.
So, red prey, for example, had to adapt — by hanging out more often in red seaweed to hide, or by evolving in a way that took advantage of that red color to scare off the enemy. As time wore on, color became useful to animals trying to stay fit, well-fed and sexy enough to get the cool girl or guy — or shrimp-thing.
Millions of species and a few mass extinctions later, creatures with fins, fur and feathers have developed ways to make every color in the Pantone chart.
A lot of the colors in plants and animals come from pigments, colored chemicals that absorb certain wavelengths of light. Many pigments are useful in other ways — granules of melanin, for example, help keep bird feathers strong, and help protect human skin from the sun. Chlorophyll is a chemical that helps plants trap light for photosynthesis; it also makes them look green.
Pigments are like a color currency — many animals can take them from plants, digest them or modify them, and eventually display a version of the pigment in their outer layer. But they have to have evolved the right mechanisms to do so.
Take pink flamingos, for example. Baby flamingos are knobby-kneed, fluffy and awkward. They are also light gray. The adults are pink only because they steal pigments called carotenoids from the foods they eat.
Carotenoids, a class of natural pigments, are abundant in plants, where they play a role in photosynthesis. Different carotenoids make carrots orange and beets red, and are responsible for the range of colors in autumn leaves. Flamingos pick them up from pigment-rich shrimp, crabs and algae. Robins and cardinals get carotenoids from berries, and koi turn orange from munching on algae.
That sort of color change sometimes shows up in humans, too.
"If you eat way too many carrots and the whites of your eyes turn a little pink hue? That's the same process," explains Sara Hallager, curator of birds at the Smithsonian National Zoo.
Eat pink, become pink. Eat red, become red. It sounds simple.
But color isn't that straightforward, as one tanning pill company found out the hard way in the 1980s: The pale people in the company's experiment stayed mostly pale, but developed red palms and red poop.
And, Hallager points out, "you can't feed flamingos blueberries and turn them blue."
Animals, it turns out, have a lot of those sorts of color limitations. Browns and grays appear frequently among birds, for example, and they can make yellow and red from pigments they get from their food. But other colors — blue especially — are surprisingly tough for a bird's body to create via dietary pigments, says Yale ornithologist Rick Prum. The reason why is still a mystery.
"Blue is fascinating because the vast majority of animals are incapable of making it with pigments," Prum says.
In fact, of all Earth's inhabitants with backbones, not one is known to harbor blue pigment. Even some of the most brilliantly blue things in nature — a peacock feather, or a blue eye, for example — don't contain a single speck of blue pigment. So, how can they look so blue?
"They have evolved a new kind of optical technology, if you will, to create this color," Prum explains — it's a trick of structure.
Blue morpho butterflies are great examples. Biologist Dan Babbitt keeps some at the Smithsonian Museum of Natural History's insect zoo.
The butterflies have a 6-inch wingspan — one side a dull brown and the other a vibrant, reflective blue. The butterflies have tiny transparent structures on the surface of their wings that bounce light in just the right way to make them appear a vibrant blue that's so bright it almost hurts your eyes. But if you grind up the wings, the dust — robbed of its reflective prism structures — would just look gray or brown.
"Everywhere you look, organisms have been inventing different solutions to creating the same color," says Antonia Monteiro, who studies butterfly wings in Singapore.
Monteiro says a lot of animals use different materials to get the same effect. Butterfly wings are sheathed in reflective scales made of chitin, the same stuff that makes a crab's shell hard. And a 2012 study found that some birds use bubble-laced keratin (the same stuff that human fingernails are made of) in the barbs of their feathers; it scatters the light from the feather in a way that happens to look blue to humans.
Having optical structures like these to make yourself blue also solves a different color challenge: going green.
"Green is a pigment that animals have really had a problem making," says Parker. That's unfortunate if you want to lurk on a green, leafy planet. So, some land animals dabble in a little color mixing.
Many green snakes and frogs, says Parker, "actually are not green at all. They've evolved a yellow pigment and a blue structural color, and the two combined produce a green effect."
When those snakes die, they turn from green to blue, because the yellow pigments fade. But the structural color, created as the snakes' scales scatter light, is practically immortal.
Structural color isn't just a hack for making blue. It's also a hack for lasting through time.
The best example might be a 50-million-year-old beetle carcass found in Germany in 1998, in a layer of dull brown and gray fossils. Even after millions of years underground, this particular beetle was still a brilliant, metallic blue.
This story is part of the NPR series Color Decoded: Stories That Span The Spectrum.
Copyright 2020 NPR. To see more, visit https://www.npr.org.