An employee inspects a bottle at a brewery bottling plant in the German state of North Rhine-Westphalia.
CNN  — 

Have you ever cracked open a bottle of beer, poured it into a clear glass and left it outside sitting in the sun? Maybe you’ve come back to it after a while to take a sip – and something isn’t quite right.

If you’ve experienced this funky taste, it’s from a chemical compound similar to the stinky smell skunks produce. That’s why the beer brewing community has dubbed this process “skunking.”

Chuck Skypeck, the technical brewing projects director at the Brewers Association, has owned and operated craft breweries for 21 years. He said the cause of skunking wasn’t really understood until around the 1960s.

When hops in beer are exposed to strong light, a photooxidation reaction takes place, creating the compound 3-methyl-2-butene-1-thiol. To prevent the process of skunking from occurring, beer brewers have opted for darkly tinted glass. It’s why you see so many beers in brown glass bottles today.

“It’s a simple reaction that creates what most people see as an undesirable flavor,” Skypeck said. “So, anything that shields the beer from that will preserve its flavor, so it is served as the brewer intends.”

Hence the popular choice among brewers: brown. But that’s not the only color seen in beer bottles; some come in green glass, too. What’s behind that choice? Given that green is not as protective from light, the reason for its use is mainly marketing, according to Skypeck.

“If you look to see what brands are in green glass, you’re going to probably find mostly heritage brands that have been around for a while,” he said. “A fair amount of European brewers use green glass. Their green bottles are their image. And again, we’re talking decades ago, there was a certain association of quality and uniqueness with green glass.”

And if that green glass wasn’t tinted dark enough to prevent skunking, Skypeck said consumers back then might simply say, “Oh, look, this tastes different. It’s coming from Europe. It must be good.”

When it comes to choosing glass as the packaging material over plastic, Skypeck said not only is glass perceived as more environmentally friendly and looks higher quality to consumers, but it prevents the beer from becoming stale, as plastics let out the carbonation in beer and let in oxygen over time.

Cans are also a popular choice for packaging and don’t let in light, but skunking is still possible due to a process known as thermal aging. More studies are needed in this area, according to Skypeck, to determine which packaging is optimal to prevent skunking.

As for any other guidance on storing beer to prevent skunking, staling or any changes to the taste, Skypeck has a simple rule: cold and dark.

“Beer is basically water, barley, sometimes wheat, hops and yeast – it’s a food product. And just like any other food product, it’s subject to losing its freshness,” he said. “What really causes any food product to lose its freshness – besides this photochemical reaction we talked about – is exposure to oxygen and exposure to (warmer) temperature.”

If you’re ever up for a wasteful at-home experiment, place a beer in sunlight for a couple of hours, and you can taste skunking for yourself.