A circuit made with upverter.com. A RGB LED and a photodiode (BPW34) + amplifier (AD620AN) is used to detect colors. The R, G and B of the LED will be turned on one at a time and the reflected light measured by the photodiode.