(CNN) Exposure to the kind of blue light emitted by outdoor LEDs, smartphones and tablets may increase your risk of breast or prostate cancer, a new study suggests.

The study, published Monday in the journal Environmental Health Perspectives , compared previous exposure to artificial lights at night between approximately 2,000 breast or prostate cancer patients and approximately 2,000 controls living in Barcelona and Madrid.

The researchers measured exposure to outdoor artificial light, such as streetlights, using images from the International Space Station and to indoor artificial light using self-reported questionnaires.

The researchers found that those exposed to high levels of outdoor blue light at night had around a 1.5-fold higher risk of developing breast cancer and a twofold higher risk of developing prostate cancer, compared with those who were less exposed. Men exposed to high levels of indoor artificial light also had 2.8-fold higher risk of developing prostate cancer, according to the study.

"The real breakthrough of this study is that, for the first time, we can see directly the color in higher resolution and relate it to individual cases," said Alejandro Sánchez de Miguel , a researcher at the Environment and Sustainability Institute at the University of Exeter and a lead author on the study.

Though previous studies have used satellite imagery to calculate the intensity of artificial light at night in large cities, the new study is the first to look specifically at the amount of blue light, according to Sánchez de Miguel.

"In this study, we focused on the satellite images, because other satellites cannot see the colors," but astronauts aboard the space station can, he added. "And so this is the first study to put an experimental value on the correlation between blue light in the general population with the risk of breast cancer and prostate cancer."

But exposure to other kinds of outdoor artificial light -- such as those that are high in the red and green portions of the visible spectrum -- was not positively associated with the development of either type of cancer, the study states.

"That finding was unexpected but suggests that it is really the blue light that is important for cancer rather than just general brightness of light," said Kristen Knutson , associate professor of neurology at Northwestern University's Feinberg School of Medicine, who was not involved in the new study.

Blue light has a shorter wavelength than other light in the visible spectrum, meaning it has more energy than other types of visible light. Exposure to blue light is known to decrease the release of melatonin in the brain, which helps regulate the body's circadian rhythm, according to Knutson.

"Blue light is the spectrum that signals the clock in the brain, and it is the spectrum that suppresses melatonin," she said. "Melatonin is a hormone that plays an important role in maintaining the synchronization of the clocks in all our body's cells. Disruption of these clocks is thought to increase the risk of cancer."

Melatonin is also known to act as an antioxidant, and adequate levels may be necessary to suppress the growth of certain hormone-sensitive cancers such as breast and prostate cancer, according to Sánchez de Miguel.

Blue light is present in some -- but not all -- outdoor LEDs, particularly those with a color temperature of more than 3,000 Kelvin.

Color temperature measures the spectral content of light: how much blue, green, yellow and red there is in it. A higher color temperature generally correlates with more blue light, according to Richard Stevens , professor of community medicine and health care at the University of Connecticut, who was not involved in the new study.

"The most efficient suppression of melatonin is with that beautiful blue light," he said. "And if you have a light bulb like a fluorescent that has spikes in that region and you turn it on at night, you're more likely to suppress melatonin."

Blue light is also produced inside smartphones and tablets. But Sánchez de Miguel cautions that the study looked only at blue light from outdoor LEDs, not smartphones or tablets.

"That is a confusion for many journalists; we have not done anything in phones," Sánchez de Miguel said. "But the same mechanism may be affecting the phones or the bulbs at home, because the physiology is the same."

The American Medication Association recommends that outdoor LEDs be no greater than 3,000 Kelvin in order to "minimize potential harmful health and environmental effects," according to a 2016 statement

Some cities, such as Davis, California, have even removed outdoor LEDs and replaced them with ones that have a lower color temperature, according to Stevens.

"The utilities put in these lights -- I think they were around 4,000 (Kelvin). And about a third of the way through through the retrofit, there was pushback from the community," Stevens said. "So the city actually sucked it up ... and put in much lower-temperature lights."

For those who wish to reduce their exposure to blue light from phones and other devices, there are a number of applications available for download, including F.lux, Redshift, SunsetScreen, Iris and Twilight.

iPhones also come with an application called Night Shift that filters out blue light, according to NPR

"I think they're great," Stevens said. "They change the spectrum of intensity on the screen depending on time of day, and that's great. That's where we need to go in society in general."

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

The most recent study was performed in two large cities in Spain, meaning the results may not be generalizable to people living in other areas.

But the findings probably still apply to people in other large metropolitan areas, according to Stevens.

"Our cities are getting brighter and brighter, and they're getting brighter throughout the world," Stevens said. "We do not know if the results for breast cancer or prostate cancer would be replicable, but it's definitely suggestive."