Stouts are some of the world’s most recognizable and iconic beers due to their dark color. But just why is their look so different from light lagers and other pale beers?

It all comes down to their ingredients. Stouts originated as a strong type of porter—in fact, they were originally called “stout porters”—and are made with a portion of heavily roasted barley.

Malted barley, or barley that has been germinated and then dried, is what gives any beer its flavor. However, the color of the resulting brew depends on how much roasted, unmalted barley is later added, as well as how long —and at what temperature—the barley has been roasted. The higher the heat while roasting, the darker the kernels come out. The process is so much like roasting coffee that some home brewers even use a coffee roaster for their grains.

There are two things that influence a beer’s color during that time. During the roasting process, the heat helps convert starch in green barley kernels to sugar, and as things heat up, the liquid sugar decomposes in a process known as caramelization. This process is responsible for that delicious golden brown color you see when you hold a marshmallow over a campfire, and it creates rich notes of toffee in your beer. Dried grain kernels are also roasted to create coffee and chocolate notes.

Once these are roasted, a little goes a long way. Even a small amount of roasted barley can darken the color of a beer quite a bit. For instance, one 5-gallon recipe for a dry Irish stout calls for 7.5 pounds of pale malt compared to 12 ounces of roasted unmalted barley and 2 ounces of chocolate malt.

Don’t think that just because dark beers taste rich they’re going to pack more of an alcoholic punch than a pale ale. Roasting barley can keep some of the starches inside from being fermented, resulting in a brew that’s lower in alcohol than some of its paler counterparts.

There’s a lot to learn—and love—about Guinness. For more answers to questions about your favorite brew, check out mental floss’s Big Questions channel—preferably with a Guinness in hand. (But please remember to drink responsibly.)