Lawsuit asks that coffee be labeled with a warning about a possible link to cancer ABC News' Dr. Jennifer Ashton discusses the chemical acrylamide.

 -- A lawsuit that wants coffee shops to post a warning about the potential link between coffee and cancer has put a spotlight on a chemical compound called acrylamide.

Acrylamide is a chemical that forms when coffee beans are roasted at high temperatures.

The Council for Education and Research on Toxics, a non-profit organization, has been pursuing a legal battle in California since 2010. The organization wants companies, including Starbucks and 7-Eleven, to post warnings about acrylamide exposure from coffee.

What do you need to know about acrylamide?

Acrylamide is found in coffee and in foods like French fries and toast, particularly burnt toast.

The National Cancer Institute (NCI) lists coffee as one of the major food sources of acrylamide, along with potato chips, crackers, bread, cookies, breakfast cereals, canned black olives and prune juice.

Acrylamide is also a component of tobacco smoke. People who smoke have three to five times the acrylamide exposure markers in their blood than non-smokers, according to the NCI.

To decrease the acrylamide content of foods, decrease the cooking time, the NCI recommends.

The presence of acrylamide is not currently regulated in food, but it is regulated in drinking water and some materials that come into contact with food. The NCI reports that, in terms of cancer, a "large number" of studies in humans have found "no consistent evidence that dietary acrylamide exposure is associated with the risk of any type of cancer."

"Like anything else that potentially could be cancer-causing, it’s about frequency and dose," said ABC News chief medical correspondent Dr. Jennifer Ashton. "In small amounts we’re exposed to it, it doesn’t generally do any harm. In higher amounts, that could be of concern."

Is coffee safe to drink?

Coffee consumption has been shown to be good for us in some ways. It can reduce the risk of medical conditions ranging from type 2 diabetes to Parkinson’s disease and certain cancers including liver, uterine and skin cancer.

"I think overwhelmingly the medical data supports massive health benefits to coffee that we have known for decades," Ashton said. As for acrylamide, "it’s like anything, risk versus benefit."

Bill Murray, president and CEO of the National Coffee Association, told ABC News in a statement that coffee has been proven to be a “healthy beverage.”

“Coffee has been shown, over and over again, to be a healthy beverage,” the statement said. “The U.S. Government's own Dietary Guidelines state that coffee can be part of a healthy lifestyle.”

Ashton stressed the importance of keeping any possible connection between coffee and cancer in context.

"We hear cancer and it can be paralyzing," she said. "We can’t live our lives in a plastic bubble. You go in an airplane to take a flight, you’re exposed to radiation. You go outside you’re exposed to sun, that’s a carcinogen."

Ashton went on to note that the World Health Organization in 2016 removed coffee from a list of possible cancer-causing compounds.

"Live a healthy lifestyle, [have] most things in moderation and try not to be paralyzed with fear [about] every single thing you do," Ashton advised. "Because it’s about the sum total, not just one thing."