[Wikipedia excerpt: ‘…In optics, a diffraction grating is an optical component with a periodic structure that splits and diffracts light into several beams travelling in different directions. The emerging coloration is a form of structural coloration. The directions of these beams depend on the spacing of the grating and the wavelength of the light so that the grating acts as the dispersive element. Because of this, gratings are commonly used in monochromators and spectrometers. .….’ ].