In reply #8 I suggested a camera and inserting a colour sensor in the place of the film. That would be a simple one pixel digital camera.
Another way would be using a hand torch. Pick one which casts a clear parallel beam. The larger reflector, the better. Replace the light bulb with a colour sensor, but shade direct light from the sensor, allowing only light from the reflector to reach the sensor. With that you can point at objects or at the sky and only light from some spot will reach the sensor. Perhaps adjusting the sensor position will widen the sector (or cone) from which it picks up light.