LEGO Color Sensor
If you need to add color sensing to your next LEGO project have a look at this RCX Input Mux & Color Sensor. Full schematics and circuit description is provided. "Color sensing depends on measuring the intensity of light at different wavelengths. A spectrometer does this by splitting the light with a prism or diffraction grating into its component wavelengths. However, spectrometers are complex and too difficult to build.