The Color Sensor is an optical sensing to recognize the surface color of an object. Support red, green, blue (RGB) three basic colors, support bright light induction, can output the corresponding specific value, restore the actual color. The onboard comes with two bright LEDs, which allows the sensor to use normally in the case of low ambient light, realizing the function of “filling light filling”.
| Operating voltage | 3.3V-5V |
|---|---|
| Detection distance | 3-10mm |
| Output protocol | 12C |
| Operating temperature | -30°C~+70°C |
| Size | 3.2cm*2.4cm |
| Color Sensor | ESP32 |
|---|---|
| SCL | SCL |
| SDA | SDA |
| VCC | 5V |
| GND | GND |







The module uses optical sensing to recognize surface colors by measuring Red, Green, and Blue (RGB) components and bright light values, accurately reconstructing the actual color of the target surface.
It includes two integrated high-brightness LEDs that provide auxiliary illumination (fill light), allowing reliable and precise color recognition even in low ambient light conditions.
The optimal detection distance ranges between 3mm and 10mm from the sensor face to the measured surface.
Connect VCC to the 5V power pin, GND to Ground, and wire the SCL and SDA pins directly to the corresponding I2C communication pins on your ESP32 controller or expansion board.
The sensor operates using the standard I2C (12C) serial bus protocol, requiring only two communication lines (SDA and SCL) for convenient micro-controller integration.
The module is designed to reliably operate across a wide industrial temperature range from -30°C up to +70°C.