Making the healthy snacking choice might be as simple as flicking a switch: You’re more likely to choose healthy foods in a brightly lit room than in a dim one, a new study in the Journal of Marketing Research suggests.

People who ordered in bright rooms were 24 percent more likely to choose nutritious foods—like salads, vegetables, and grilled fish—than those who ordered in darker establishments.

On average, the people in the dim restaurants ordered 39 percent more kilojoules than those in lighter places.

Bright lighting may nudge you toward healthier foods by keeping your brain alert, says lead study author Dipayan Biswas, Ph.D., a marketing professor at the University of South Florida.

That’s because light suppresses your brain’s production of the sleep-regulating hormone melatonin, keeping you awake and attentive.

And that makes you more likely to make mindful decisions—for example, to choose a side of broccoli over fries—rather than give in to the temptation of indulgences, Biswas says.

Of course, you can’t change the lighting in a restaurant, but you can put these findings to work in your own kitchen.

When you’re on the hunt for a snack, make sure the lights in your kitchen are working in your favour: Flip your dimmer switch to the brightest setting and keep your blinds open to let sunlight in.

If you do find yourself in a dimly-lit restaurant, start your meal with a cup of tea or coffee first.

The researchers say that caffeine may have an effect similar to bright lighting, keeping your brain alert to help you make smarter eating choices.