Few things beat the heat on a summer day like ice cream. But would you want to cool off by eating inky-black soft serve inside a burnt-looking cone? That’s the strange twist on a classic treat being dished out at Little Damage, an ice cream parlor in Los Angeles, California. I visited the shop to discover the secret behind this odd creation.

I ordered a cone and took a lick. Phew! It tasted great, like chocolate and hazelnuts. I learned that it’s made exactly like regular ice cream, with one additional ingredient to give it its color: activated charcoal.

Activated charcoal is created by heating wood or other plant matter at high temperatures until it turns to ash. Occasionally eating the resulting fine, black powder is harmless, says Dr. Kent Olson. He’s a retired toxicologist—a doctor who studies the effects of substances on the human body.

Doctors actually give activated charcoal to patients to remove toxins from their bodies. “Activated charcoal has been used in medicine for many years as a way to treat people who’ve been poisoned,” says Olson. That’s because the compound’s particles are full of microscopic pores. Those tiny holes cause other substances, like harmful contaminants, to cling to the surface of activated charcoal. This process is called adsorption.

It’s only recently that chefs have started using activated charcoal to color all sorts of drinks and foods, from lattes to bagels, creating trendy black treats. Although my ice cream was delicious, eating it had one downside: It temporarily stained my mouth black!