I'm a bit suprised nobody has answered this. I don't know anything about PICS etc, but I might advise against using LDRs. They really are quite slow for an application like this. A photodiode is more suitable, but they are only really sensitive to infrared light. If you make your light source infrared, then you can use the detector I have posted. However, i'm not sure how infrared responds in terms of being reflected or absorbed by different colour materials. The detector will give a logic changeover in response to different levels of infrared light. The sensitivity is controlled by the 220k resistor (higher = more sensitive, but don't try and go over 1M).