COLOUR SENSOR
The Color Sensor is a complete color detector. It consists of a TAOS TCS3200 RGB sensor chip and 4 white LEDs. It can detect and measure a nearly limitless range of visible colors to a certain degree.
The color of an object we can see in fact is the chromatic light the object reflects in the white light (sunlight) after it absorbs the rest ones. The white color is a mixture of various visible colors, which means it includes each colored light like red (R), yellow (Y), green (G), blue (B), and purple (P). Based on the theory of three primary colors, any color is made by mixing the three primary colors (red, green, and blue) in a certain proportion.
Thus, knowing the proportion you can get the color of the tested object. For TCS3200, when a color filter is selected, it only allows a specific primary color to pass through and blocks the other two colors. With the light intensity value of the three primary colors, by analysis we can know the color of light reflected to TCS3200. The TCS3200 sensor has 4 types of filter: red filter, green filter, blue filter, and clear with no filter.