Here’s more reason to add more fruits and veggies, and maybe a bite of dark chocolate, to your daily diet: According to a new study in the journal Nature Communications, eating a diet rich in flavonoids could help reduce your risk of heart disease and cancer, reports.

Flavonoids are a diverse group of phytonutrients (a.k.a. plant chemicals) found in a wide variety of fruits, vegetables, teas and other plant-based foods. The biologically active nutrients are responsible for giving many plants their vivid color, from the green of kale and spinach to the purple of a grape.

The study analyzed data from the Danish Diet, Cancer and Health cohort, taking into account information collected on the diets of more than 50,000 people in Denmark over 23 years. In their analysis, researchers discovered that the more flavonoids people ate, the less likely they were to die from heart disease or cancer. This benefit topped out at about 500 mg of flavonoids a day. While previous studies have found people who eat plenty of flavonoid-rich foods have a lower risk of certain cancers—breast cancer, for example—this large, long-term study strengthens the case for the broader cancer-protective benefit; as an observational study, however, it doesn’t prove cause and effect. 

As to how the pigment-rich chemicals may help reduce the risk for cancer, “Flavonoids have been shown to be anti-inflammatory and improve blood vessel function, which may explain why they are associated with a lower risk of death from heart disease and cancer,” said Nicola Bondonno, a post-doctoral research fellow at Australia’s Edith Cowan University, in a recent press release about the report. However, study authors say more research is needed to understand exactly how the colorful compounds do this in the human body.

For those looking to increase their flavonoid intake, foods that are rich in the chemical include: tea (especially green tea), dark chocolate, berries, apples, citrus fruits, asparagus, leafy greens and red wine.

It doesn’t take that much. The benefits topped out at about 500 milligrams of flavonoids in the diet on an average daily basis. According to the study authors, you’d get that much in a day by consuming one cup of tea, an apple, and orange, a little more than a half cup of blueberries and a cup of broccoli. Eating fewer flavonoids still provides some benefits, while eating more doesn’t appear to provide more protection. 

In addition to their potential cancer-fighting benefits, flavonoids have also been linked to a variety of other health benefits, including a reducing the risk of cardiovascular disease and type 2 diabetes.

Interestingly enough, the study also showed that people who were at high risk of developing diseases due to smoking and drinking more than two alcoholic drinks a day seemed to benefit the most from eating flavonoid-rich foods. That’s not to say that eating more fruits and veggies can cancel out the bad habit, researchers warn. However, it could be good advice for people to consider while quitting smoking or reducing their alcohol intake.

To read the full article in Health, click here.

To read the study abstract, click here.

For further reading, check out “Can Eating Organic Cut Your Cancer Risk?” and “How to Increase Fruits and Vegetables”