An array of parallel lines with spacing comparable to wavelengths of light. The array has the ability to split white light into a rainbow because the different wavelengths are bent, or diffracted, by different amounts. Such gratings were originally produced by using a diamond to rule closely spaced lines onto glass, but they are now more often produced by optical interference.