Or you can go back to basics and build this reflective RGB sensor from an LED and a photocell ... lights on an object and measure how much light it reflects. If you know the red, green, and ...
Manually switch the lamp on and off or set the built-in photocell to work ... a reflective face that spreads the light across a wide coverage area and an auto sensor shut-off that prolongs battery ...