If you use a prism or better yet, a diffraction grating, you can cast a spectrum on a surface. There are numberous known light source spectral lines that you can then use to mark off the wavelength on a plate. From there, you just make a scale. Instant wavelength sensor.