Going into a dark room can help until the migraine passes.
Often, exposure to bright light during a migraine can worsen the migraine itself.
When these rays are all combined (as in sunlight), they make white light.

Verywell / Emily Roberts
Two colors in particularblue and greenare of special interest when it comes to migraine prevention and treatment.
Blue Light
Blue light has a shorter wavelength and more energy than other rays of light.
It often is a large component of white light.
In other words, blue light is everywhere.
Furthermore, you are less likely to experience aversion or sensitivity to green light during a migraine attack.
Of the participants, almost 80% reported more intense headaches with colored light exposureall except green.
In fact, about 20% experienced a decreased headache intensity with green light exposure.
Green light devices can be purchased online, however they are costly.
Green light therapy devices may be useful in relieving migraine pain.
2021;41(2):135-147. doi: 10.1177/0333102420956711
Wu Y, Hallett M.Photophobia in neurologic disorders.Transl Neurodegener.
2018;159(10):20302034. doi:10.1097/j.pain.0000000000001303
Harvard Medical School.Green light for migraine relief.