A rainbow is the visual result of splitting white light into its constituent colours according to wavelength. The order of the colours is red, orange, yellow, green, blue, indigo, violet – with red having the longest wavelength and violet the shortest. The natural phenomenon is caused by the prismatic effect of raindrops in the sky but it can also be caused by diffractive gratings with a spatial frequency approaching the wavelength of light.