In optics, a diffraction grating is an optical grating with a periodic
structure that diffracts light into several beams traveling in different
directions (i.e., different diffraction angles). The emerging coloration is a
form of structural coloration. The directions or diffraction angles of these
beams depend on the wave (light) incident angle to the diffraction grating,
the spacing or distance between adjacent diffracting elements (e.g., parallel
slits for a transmission grating) on the grating, and the wavelength of the
incident light. The grating acts as a dispersive element.