Step 1: Parts Needed
1 RGB LED
1 Standard red LED
1 1k ohm resistor
1 Photoresistor (changes resistance depending on the amount of light shone on it)
I only need the microcontroller and RGB LED to have a wide range of color detectors, but if you only want a circuit that detects one color, you don't need a microcontroller - you only need a bright LED of the color you want to detect. The standard red LED is the "indicator LED" - it lights up when the right color is detected.
Step 2: Build the Circuit
I put electrical tape around the photoresistor so ambient light doesn't get in - only the light directly above it will be detected.