People are more likely to stop taking their medication after a heart attack if the appearance of their pills suddenly changes without explanation, a new study suggests.

Generic versions of a given medication can look different from each other and from the brand-name version, researchers note, even though they work equally well.

“Patients need to be on their guard about pill appearance changes, particularly since it’s hard as a patient to know what’s going on when the blue pill you’re used to taking every morning suddenly is now yellow,” said lead author Dr. Aaron S. Kesselheim, from Brigham and Women’s Hospital in Boston.

Patients should ask the pharmacist why their pills look different, and when they learn it was an expected change, they should keep taking them and expect the same results, he said.

In general, 20 to 30 percent of prescriptions are never filled, and 50 percent are not continued as prescribed, according to the U.S. Centers for Disease Control and Prevention.

By 2020, the number of Americans affected by at least one chronic condition requiring medication will grow to 157 million, based on a World Health Organization projection.

For the new study, published in the Annals of Internal Medicine, Kesselheim and his colleagues analyzed data on more than 11,000 people who were prescribed common medications including beta blockers, statins and ACE inhibitors after a heart attack.

Over the following year, almost a third had a change in pill color or shape. Those patients were between 30 and 70 percent more likely to stop taking their medication than patients whose pills stayed the same.

Patients whose pills changed shape were especially likely to stop taking them, the researchers found. Statins changed in appearance most often.

It is particularly important for patients to be taking their medications as prescribed during the first year after a heart attack to reduce the risk of further heart problems, Kesselheim told Reuters Health in an email. But changing or stopping medications during this period is a common problem.

“By some reports, there’s a 50 percent rate of non-adherence to prescribed medicines among cardiovascular disease patients,” Kesselheim said.

Changing pill appearance is not the most important factor contributing to medication non-adherence, but it is a new one to consider, he said. His team previously found a similar problem among patients with epilepsy on anti-epileptic drugs.

Because the U.S. Food and Drug Administration has approved generic drugs as being interchangeable, changes in appearance based on a generic drug’s manufacturer “will not have any effect on the effectiveness or safety of the drug,” Kesselheim said.

“The more physicians and pharmacists can do to prepare patients that this might happen, I think the easier the transition will be,” he said.