Sensing wavelength of lights

Just use filters and a motorised filter wheel (as in astrophotography)