Component guide · Intermediate · 4 min read
Spectral and Colour Light Sensors

AS7341 11-Channel (Adafruit, DFRobot, Waveshare), AS7343 14-Channel, AS7262 6-Channel, SparkFun AS7265x Triad, AS734x, Mikroe VD6283, BH1745, ISL29125, LTR-381RGB, APDS9999, TMG39931, Pmod COLOR and DFRobot CCT Meter
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
An RGB colour sensor reads red, green and blue light. A spectral sensor such as the AS7341 splits visible light into 8 to 18 narrow bands, so it can compare LED colours, measure plant grow lights, check liquids or sort objects more reliably than RGB. AS7343 adds more channels, the AS7265x Triad reaches into UV and near-IR, and CCT meters report colour temperature and lux directly.
Key specs at a glance
- Channels
- RGB (BH1745, ISL29125), 6 (AS7262), 11 (AS7341), 14 (AS7343), 18 (AS7265x)
- Range
- Visible; AS7265x adds UV and NIR
- Interface
- I2C on all; UART also on AS7262 and Triad
- Supply
- 3.3 V; 5 V tolerant breakouts by maker
- Extras
- Flicker detection on AS7341; proximity on APDS9999 and TMG39931
- Connector
- STEMMA QT/Qwiic, Gravity, Pmod or pins
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1ACEBOTT QB105 Color Sensor Module – I2C Output, 3-10mm Detection₹989
Option 2AS734x Visible Infrared Color Spectrometer Sensor Module – I2C Interface₹689
Option 3Adafruit APDS9999 Proximity, Lux Light & Color Sensor – STEMMA QT / Qwiic₹1,202
Option 4Adafruit AS7341 10-Channel Light / Color Sensor Breakout – STEMMA QT/Qwiic₹2,701
Option 5Adafruit AS7343 14-Channel Light / Color Sensor Breakout – STEMMA QT / Qwiic₹3,173
Option 6DFRobot Fermion AS7341 11-Channel Visible Light Sensor Breakout Module₹2,227
What the Spectral and colour light sensors: AS7341, AS7343, AS7262, AS7265x Triad, VD6283, BH1745, ISL29125, APDS9999 and CCT meters is
A spectral sensor such as the AS7341 measures light in many narrow colour bands instead of just red, green and blue, so it can compare light sources and colours precisely.
For object colour, use the board's own white LED or a steady light source and fix the distance, ideally in a dark shroud; ambient light changes every reading. Take a white reference reading and divide each channel by it to get reflectance.
For light measurement, point the sensor at the source and set gain and integration time so no channel saturates. Spectral sensors are not lab spectrometers: channels are broad and readings are relative unless you calibrate against a known reference.
Spectral and colour light sensors: AS7341, AS7343, AS7262, AS7265x Triad, VD6283, BH1745, ISL29125, APDS9999 and CCT meters pinout
The pins on the Spectral and colour light sensors: AS7341, AS7343, AS7262, AS7265x Triad, VD6283, BH1745, ISL29125, APDS9999 and CCT meters and what each one does.
| Pin | Function |
|---|---|
| VIN | 3.3 V or 5 V by breakout |
| GND | Ground |
| SDA | I2C data |
| SCL | I2C clock |
| INT | Interrupt (optional) |
| LED / GPIO | On-board illumination LED control |
- VIN
- 3.3 V or 5 V by breakout
- GND
- Ground
- SDA
- I2C data
- SCL
- I2C clock
- INT
- Interrupt (optional)
- LED / GPIO
- On-board illumination LED control
Wiring the Spectral and colour light sensors: AS7341, AS7343, AS7262, AS7265x Triad, VD6283, BH1745, ISL29125, APDS9999 and CCT meters
AS7341 address is 0x39; watch for clashes with other I2C sensors at the same address.
| Spectral and colour light sensors: AS7341, AS7343, AS7262, AS7265x Triad, VD6283, BH1745, ISL29125, APDS9999 and CCT meters pin | Connection | Note |
|---|---|---|
| VIN | 3.3V (or 5V if the breakout allows) | Check the board |
| GND | GND | |
| SDA | A4 on Uno, GPIO21 on ESP32 | |
| SCL | A5 on Uno, GPIO22 on ESP32 |
- VIN
- Connection:
- 3.3V (or 5V if the breakout allows)
- Note:
- Check the board
- GND
- Connection:
- GND
- SDA
- Connection:
- A4 on Uno, GPIO21 on ESP32
- SCL
- Connection:
- A5 on Uno, GPIO22 on ESP32
Example code
Lower the gain if any channel reads 65535 (saturated). DFRobot and Waveshare AS7341 boards have their own libraries with the same idea.
#include <Adafruit_AS7341.h>
Adafruit_AS7341 as7341;
void setup() {
Serial.begin(115200);
if (!as7341.begin()) {
Serial.println("AS7341 not found");
while (1) delay(10);
}
as7341.setATIME(100);
as7341.setASTEP(999);
as7341.setGain(AS7341_GAIN_256X);
}
void loop() {
uint16_t r[12];
if (!as7341.readAllChannels(r)) return;
const char* names[] = {"415","445","480","515","CLR","NIR","555","590","630","680","CLR","NIR"};
for (int i = 0; i < 12; i++) {
if (i == 4 || i == 5) continue; // duplicate clear/NIR slots
Serial.print(names[i]); Serial.print("nm:"); Serial.print(r[i]); Serial.print(" ");
}
Serial.println();
delay(1000);
}Setup and tuning
use the maker's library (Adafruit AS7341, DFRobot or SparkFun AS7265x) and read all channels in one call.
raise them in dim light and lower them in bright light so channels do not saturate.
keep the same distance and angle to the sample for every measurement.
take a reading of a white reference and divide later readings by it to compare colours.
use a black shroud around the sensor and sample when measuring reflected colour.
What you need
Shop this list17 of 17 found in our store · ₹37,196
ACEBOTT QB105 Color Sensor Module – I2C Output, 3-10mm Detection: the part this guide coversACEBOTT QB105 Color Sensor Module – I2C Output, 3-10mm Detection₹989
AS734x Visible Infrared Color Spectrometer Sensor Module – I2C Interface: another version this guide coversAS734x Visible Infrared Color Spectrometer Sensor Module – I2C Interface₹689
Adafruit APDS9999 Proximity, Lux Light & Color Sensor – STEMMA QT / Qwiic: another version this guide coversAdafruit APDS9999 Proximity, Lux Light & Color Sensor – STEMMA QT / Qwiic₹1,202
Adafruit AS7341 10-Channel Light / Color Sensor Breakout – STEMMA QT/Qwiic: another version this guide coversAdafruit AS7341 10-Channel Light / Color Sensor Breakout – STEMMA QT/Qwiic₹2,701
Adafruit AS7343 14-Channel Light / Color Sensor Breakout – STEMMA QT / Qwiic: another version this guide coversAdafruit AS7343 14-Channel Light / Color Sensor Breakout – STEMMA QT / Qwiic₹3,173
DFRobot Fermion AS7341 11-Channel Visible Light Sensor Breakout Module: another version this guide coversDFRobot Fermion AS7341 11-Channel Visible Light Sensor Breakout Module₹2,227
DFRobot Gravity AS7341 11-Channel Visible Light Sensor – I2C Interface: another version this guide coversDFRobot Gravity AS7341 11-Channel Visible Light Sensor – I2C Interface₹2,309
DFRobot Gravity Factory Calibrated Correlated Color Temperature CCT & ALS Meter for Professional Photography: another version this guide coversDFRobot Gravity Factory Calibrated Correlated Color Temperature CCT & ALS Meter for Professional Photography₹3,489
Digilent Pmod COLOR Color Sensor Module – I2C Interface, IR-Blocking Filter: another version this guide coversDigilent Pmod COLOR Color Sensor Module – I2C Interface, IR-Blocking Filter₹1,369
Lite-On LTR-381RGB-01 SMD-6 RGB Ambient Light Sensor ROHS: another version this guide coversLite-On LTR-381RGB-01 SMD-6 RGB Ambient Light Sensor ROHS₹74
Mikroe SPECTROMETER 2 CLICK (Mikroe-5167) – VD6283TX Colour & Light Sensor Board, I²C, RGB/IR/Clear Channels, mikroBUS: another version this guide coversMikroe SPECTROMETER 2 CLICK (Mikroe-5167) – VD6283TX Colour & Light Sensor Board, I²C, RGB/IR/Clear Channels, mikroBUS₹2,729
Pimoroni AS7262 6-Channel Spectral Sensor Breakout – I2C/UART Interface: another version this guide coversPimoroni AS7262 6-Channel Spectral Sensor Breakout – I2C/UART Interface₹2,368
Pimoroni BH1745 Luminance & Color Sensor Breakout – I2C Interface: another version this guide coversPimoroni BH1745 Luminance & Color Sensor Breakout – I2C Interface₹1,140
Seeed Studio Studio Grove TMG39931 Light, Gesture, Color & Proximity Sensor Module: another version this guide coversSeeed Studio Grove TMG39931 Light, Gesture, Color & Proximity Sensor Module₹1,439Closest match, check the specs
SparkFun ISL29125 RGB Color Light Sensor Breakout Board – I2C Interface: another version this guide coversSparkFun ISL29125 RGB Color Light Sensor Breakout Board – I2C Interface₹1,669
SparkFun Triad Spectroscopy Sensor – AS7265x Spectral Sensor Module: another version this guide coversSparkFun Triad Spectroscopy Sensor – AS7265x Spectral Sensor Module₹7,629
Waveshare AS7341 Spectral Color Sensor – I2C Interface, 3.3V/5V Compatible: another version this guide coversWaveshare AS7341 Spectral Color Sensor – I2C Interface, 3.3V/5V Compatible₹2,000
Alternatives and when to choose them
- TCS34725 colour sensor: simple RGB.
- IR reflective sensors: grayscale and line detection.
Common mistakes to avoid
- Running at high gain in bright light, so channels saturate.
- Changing the distance to the sample between readings.
- Skipping a white reference, so colours cannot be compared.
- Letting room light leak in when measuring reflected colour.
Frequently asked questions
What is the difference between RGB and spectral sensors?
RGB sensors read three broad bands; spectral sensors read 6 to 18 narrow bands for better colour and light analysis.
Can the AS7341 measure plant grow lights?
Yes. Its channels show how much blue, red and other bands a lamp gives, useful for comparing grow lights.
Why are all my readings at maximum?
The sensor is saturated. Lower the gain or the integration time.
Does the AS7341 detect flicker?
Yes. It has a flicker detection feature for 100 and 120 Hz light flicker.
Can I use it with a 5 V Arduino?
Use a breakout with level shifting and a regulator, as most bare sensors are 3.3 V.
Parts for this guide
- ₹989View
- ₹689View
- ₹1,202View
- ₹2,701View
- ₹3,173View
- ₹2,227View
- ₹2,309View
DFRobot Gravity Factory Calibrated Correlated Color Temperature CCT & ALS Meter for Professional Photography₹3,489View- ₹1,369View
- ₹74View
Mikroe SPECTROMETER 2 CLICK (Mikroe-5167) – VD6283TX Colour & Light Sensor Board, I²C, RGB/IR/Clear Channels, mikroBUS₹2,729View- ₹2,368View
- ₹1,140View
- ₹1,439View
- ₹1,669View
- ₹7,629View
- ₹2,000View
Projects that use it
Put this into practice: 6 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.
