As Steve say, the simplest way to go is RGB filters and 3 optical sensors. This together with some processing algorithms in a microcontroller should make a decent colour analyzer.
I would assume from these descriptions that, using RGB filters, the detector will figure out the magnitude of each primary color (voltage level of the photo detector?), and then use an algorithm to calculate the color that had these RGB values.
Well, probably your code inside a uC or whatever will determine the colour.
The question is, what do you want to do? It may just be a case of determining a certain broad range of values which represent a target value, or it may be much more complex.