A diffraction grating consists of a large number of equally spaced
parallel slits. When light is incident on a grating, the light from each slit
diffracts and will interfere with the light from the other slits. When the
conditions for constructive interference for a given wavelength are
satisfied, that color is enhanced and hence observed.