The TCS3200 is a colour sensor has an array of photodiodes that detect colour, the photodiodes are arranged in groups of four with red, green, or blue filters on three of the photodiodes and no filter on the fourth. This allows the sensor to measure the amount of red, green, blue, and white light that hits the sensor.
This module incorporates four white LEDs to illuminate an object of which you wish to measure the colour of. The white light from these LEDs hits your test object and reflects back to the module’s sensor, which then measures the amount of red, green, blue, and white light that was reflected.
Being photosensitive, this module is affected by background light, to get the best results, use in a dark place.