Most of us know that eating five portions of fruit and vegetables a day will do us far more good than 20 minutes on a sun bed or two hours basted with factor 10 and sprawled on a Mediterranean beach in high summer. But new research suggests that it will also make us more attractive to the opposite sex. Consequently, it seems far more likely to affect the dietary habits of the young than any amount of hectoring from the Department of Health.

"Currently we tell them to 'eat well or in 50 years you will have a heart attack'," says Ian Stephen, 29, assistant professor of psychology at Nottingham University's Malaysian campus. "Now we can say: 'eat fruit and veg and you will look better in six to eight weeks'." But he is adamant that he never set out to find a novel way of reinforcing medical advice. "I don't really care what people do," he insists. "I'm an experimental psychologist, not a public health PR man. However, our results suggest that eating well and staying out of the sun would make you look healthier."

How come? Well, the key component is the carotenoid, an antioxidant responsible for the red colouring found in, for instance, tomatoes, peppers, plums and carrots. That redness eventually imbues the human skin with yellowness, or rather a healthy-looking golden glow. "Carotenoids are stored in fat under the skin," Stephen explains. "They are also secreted through the skin in serum, and are then reabsorbed into the top layer of the skin, bestowing that golden colour."

Alert Guardian readers may have deduced by now that he is talking about Caucasian skins. "Yes, it has been pointed out to me, usually by social scientists, that there is something culturally imperialist about the research," he says. "Ironically, there's almost something racist in that suggestion because the implication is that you can't see the same colour changes in black faces. Of course you can. In West Africa, for instance, skin pigmentation is affected by consumption of red palm oil with high levels of carotenoids. We're hoping to do further cross-cultural studies in the UK, Africa and Malaysia."

The original study was carried out in Scotland, where the sun's rays are not over-intrusive. It just happens that Stephen did the first part of his PhD at St Andrews University. There he worked at The Perception Laboratory, dedicated to investigating "the many facets of face perception" – what makes one person appear more trustworthy than another, for instance, or more attractive.

In that regard, there has been plenty of work on shape, but very little on skin colour, he says. "There are two main pigments that affect the yellowness of skin. One comes from carotenoids, the other from melanin, which is yellow and dark, giving the brown colour that we associate with a sun tan. Using a scientific instrument called a spectrophotometer, I measured the colour change associated with changes in carotenoid levels and melanin levels in the skin. Then, using a computer programme, I allowed participants to adjust the levels of carotenoid and melanin colour in photographs of faces to make them look as attractive as possible. Participants chose to increase melanin colour slightly, but increased carotenoid colour lots.

In another part of the experiment, he used a questionnaire to estimate the amount of fruit and vegetables in the daily diet of another group of participants and then analysed skin tones to confirm that what might be called the golden glow was explained by changes in carotenoid levels and not other pigments such as melanin.

Just over 80 people took part in the dietary study, and 30 in transforming 51 faces on the computer. They were aged from 18 to 26, but Stephen maintains: "There's no reason to suggest that we wouldn't get similar results from older participants." Any gender differences? "The preference for light skin is stronger in women's faces than in men's. Which might indicate that the tanned and leathery look is not quite so off-putting to women as it is to men.

Overwhelmingly, though, the results suggested that a healthy golden glow was equated with attractiveness. "They didn't all give the same answer to three decimal points," says Stephen. "But there was enough common ground to indicate that there wouldn't be much value in extending the experiment to another 300 participants."

The wider implications, he suggests, are that some things haven't changed since Darwin pointed to skin colour as an element in sexual attraction. "The whole purpose of attractiveness from an evolutionary point of view is that the person doing the viewing is looking for a viable, healthy, high-quality mate," he says.

Professor David Perrett, who heads The Perception Lab at St Andrews, points out: "This is something we share with other species. For example, the bright yellow beaks and feathers of many birds can be thought of as adverts showing how healthy a male bird is. What's more, females of those species prefer to mate with brighter, more colourful males. But this is the first study in which this has been demonstrated in humans."

The study was funded by the Biotechnology and Biological Sciences Research Council and Unilever Research. But the ultimate beneficiaries may yet include the Department of Health and, indeed, the many under-30s who might suddenly see the benefits of tucking away their "five a day".

• This article has been amended to correct the spelling of St Andrews University