colours of the rainbow

Wpectra are computed as Fourier-transforms of any periodic phenomenon. In what way does a prism compute a Fourier-transform?