Skip to main content
Skip table of contents

RGB Color Sensor (TCS34725)

This script uses the TCS34725 color sensor to determine the color of an object. The breakout board from Adafruit ( has a built-in white LED to illuminate the object. This LED can be controlled by connecting it to a digital pin on the T-series devices. In the below example, FIO6 is used (although the LED pin is not connected in the images)

Information on how to use the values from the sensor can be found on the datasheet. In the example below, color (Simply "Red", "Green", or "Blue") is determined by the most intense color. Specific calculations can be created by the user for specific applications, such as detecting a hue value or the reflectivity of the object. A good understanding of the device's datasheet is important for modifying the script.

This example can be found in our Kipling git repository:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.