When you fill your plate with colorful fruits and vegetables, it does a number of things: it makes your meal more appetizing; it makes it more nutritious; and it can help protect your memory.

“There is mounting evidence suggesting flavonoids are powerhouses when it comes to preventing your thinking skills from declining as you get older,” Walter Willett, one of the authors of a recent study linking the nutrients in brightly-colored fruits and vegetables to cognitive performance, said in a statement.

Colorful fruits and vegetables are high in flavonoids, compounds that are found in foods like berries, onions, red cabbage and citrus fruits. They are powerful antioxidants, providing chemicals that protect body tissues from damage. Eating too few antioxidants may be related to a decline in brain health as you age, the Harvard study found.

Flavones, common in some herbs and spices and certain yellow or orange fruits and vegetables, provided a 38 percent risk reduction — roughly equivalent to being three to four years younger.

Nearly 50,000 women and 28,000 men whose average ages were 48 and 51 respectively when the Harvard University study began were followed. Over the next 20 years, the participants completed questionnaires about how often they ate different foods, and researchers used that information to calculate each person’s intake of the different kinds of flavonoids.

People in the study were asked to evaluate their own cognitive abilities on two occasions, answering questions such as, “Do you have more trouble than usual remembering recent events?” or “Do you have more trouble than usual remembering a short list of items?” These questions helped identify memory problems at a point when they had become noticeable to the participants, but not necessarily serious enough that the problems would have been spotted during a formal cognitive screening.

People who ate the highest amounts of flavonoids had about 600 milligrams each day and those who consumed the least ate about 150 milligrams. A half-cup serving of strawberries provides about 180 mg of flavonoids. Those who ate the highest amounts of flavonoids reported about 20 percent less risk of cognitive decline compared to the people who ate the lowest amounts.

Flavonoids fall into six groups: flavanols, flavones, flavanones, flavan-3-ols, isoflavones and anthocyanins. When the researchers looked at different types of flavonoids, flavones and anthocyanins appeared to offer the most protection against cognitive decline. Flavones, common in chamomile and green tea, parsley, sage, oregano and peppermint and some yellow or orange fruits and vegetables, provided a 38 percent risk reduction — roughly equivalent to being three to four years younger — while anthocyanins, responsible for the red, purple and blue colors in fruits and vegetables, were associated with a 24 percent lesser risk.

“While it is possible other phytochemicals are at work here, a colorful diet rich in flavonoids — and specifically flavones and anthocyanins — seems to be a good bet for promoting long-term brain health. And it's never too late to start, because we saw those protective relationships whether people were consuming the flavonoids in their diet 20 years ago, or if they started incorporating them more recently,” said Willett, a professor of Epidemiology and Nutrition at Harvard T.H. Chan School of Public Health and a professor of Medicine at Harvard Medical School.

“Our results are exciting because they show that making simple changes to your diet could help prevent cognitive decline,” he added. You can protect your memory by eating more foods containing anthocyanins such as blueberries, blackberries, strawberries, red and purple grapes, and cherries; and the flavones found in oranges and orange juice; red, orange and yellow peppers; grapefruit and grapefruit juice; and apples, pears and celery. As little as a quarter to half cup a day of flavonoid-rich fruits and veggies was found to make a positive difference in memory.

The study is published in Neurology.