Very rarely, at sunrise or sunset, there are flashes of green light visible at the top edge of the sun for a fraction of a second as the sun just disappears (sunset) or just starts to appear (sunrise). This effect only happens when there are no clouds near the sun, the atmosphere is clear and free of dust or haze, and where there is an unobstructed view of a very low horizon, such as on the ocean. The green flash (also called green ray) is caused mostly by refraction and scattering of the blue end of the sun's light spectrum by the Earth's atmosphere, leaving the green portion of the spectrum visible.