📋 Overview

The 5mm (T1-3/4) RGB LED is one of the most versatile components in any maker's toolkit. Rather than being a single-color LED, it contains three separate LED dies — red, green, and blue — inside one 5mm package. By controlling the brightness of each color independently, you can produce virtually any color in the visible spectrum, from warm amber to cool cyan to deep purple and everything in between.

This guide covers both the clear lens and diffused lens versions of the 5mm common anode RGB LED sold by Envistia Mall. Both variants share the same electrical specifications — the difference is in how the light is distributed. The clear lens produces a focused, directional beam (60° viewing angle), while the diffused lens scatters the light evenly for a softer, wider glow (120° viewing angle).
💡 What Is an RGB LED?
A standard LED emits a single color of light. An RGB LED combines three LEDs — Red, Green, and Blue — into a single package with four pins instead of the usual two. By mixing these three primary colors of light at different intensities, you can create a wide range of colors. This is the same principle used by your TV, computer monitor, and phone screen — they all use tiny red, green, and blue elements to produce full-color images.
For example:
- Red + Green = Yellow
- Red + Blue = Magenta / Purple
- Green + Blue = Cyan
- Red + Green + Blue = White
By using PWM (Pulse Width Modulation) from a microcontroller like an Arduino, you can set each color to any brightness level between fully off and fully on, giving you access to millions of possible color combinations.
Common Anode vs. Common Cathode
RGB LEDs come in two wiring configurations:
- Common Anode (CA): The three LEDs share a single common positive (+) pin. This common pin connects to your supply voltage (e.g., 5V). Each color is turned on by connecting its individual pin to ground (LOW) through a current-limiting resistor. With an Arduino, writing a PWM value of 0 = full brightness and 255 = off (the logic is inverted).
- Common Cathode (CC): The three LEDs share a single common ground (−) pin. This common pin connects to ground. Each color is turned on by applying a positive voltage (HIGH) to its individual pin through a current-limiting resistor. With an Arduino, writing a PWM value of 0 = off and 255 = full brightness (standard logic).

Note: Envistia Mall stocks the Common Anode version. Keep in mind that common anode LEDs use inverted PWM logic — a lower PWM value means brighter output. This is the most important thing to remember when writing your code.
⭐ Key Features
- Three Colors in One Package — Red, green, and blue LEDs in a single 5mm housing
- Common Anode Configuration — Shared positive pin for simplified wiring
- Available in Clear and Diffused — Clear for focused beams, diffused for even color blending
- Full Color Spectrum — Mix RGB values to produce virtually any color
- PWM Compatible — Use with Arduino or any microcontroller for dynamic color control
- Standard 5mm (T1-3/4) Package — Fits standard LED holders and breadboards
- Low Power Consumption — Tested at 20mA per color channel
- High Luminous Intensity — Up to 5000 mcd (green channel)
📌 Pinout
The 5mm RGB LED has 4 pins. The longest pin is the common anode (+V). With the LED facing you (lens on top) and the flat side of the lens to the right, the pins from left to right are:
| Pin | Position | Function |
|---|---|---|
| 1 | Far left | Red cathode (−) |
| 2 | Center-left (longest pin) | Common Anode (+V) |
| 3 | Center-right | Green cathode (−) |
| 4 | Far right | Blue cathode (−) |
💡 Tip: The longest pin is always the common anode. The flat edge on the rim of the LED lens is located next to the blue cathode pin — use it as a reference if the pins have been trimmed.
📊 Specifications
| Parameter | Clear | Diffused |
|---|---|---|
| Package Size | 5mm (T1-3/4) | 5mm (T1-3/4) |
| Configuration | Common Anode | Common Anode |
| Number of Pins | 4 | 4 |
| Forward Voltage (Vf) | ||
| Red | 2.25V | 2.25V |
| Green | 3.5V | 3.5V |
| Blue | 3.5V | 3.5V |
| Dominant Wavelength (nm) | ||
| Red | 630–640 | 630–640 |
| Green | 515–525 | 515–525 |
| Blue | 465–475 | 465–475 |
| Luminous Intensity (mcd) | ||
| Red | 1000–1200 | 1000–1200 |
| Green | 3000–5000 | 3000–5000 |
| Blue | 2000–3000 | 2000–3000 |
| Viewing Angle | 60° | 120° |
| Reverse Current | 100µA max | 100µA max |
| Test Current (IF) | 20mA | 20mA |
🔌 Wiring
Basic Wiring (Common Anode)
Since these are common anode LEDs, the common pin (pin 2, longest pin) connects to your positive voltage supply (typically +5V or +3.3V). Each color cathode pin connects to a GPIO or PWM pin on your microcontroller through a current-limiting resistor. The LED turns on when the cathode pin is pulled LOW.
| LED Pin | Connects To | Through |
|---|---|---|
| Pin 1 — Red | Arduino PWM pin (e.g., D9) | 150Ω resistor |
| Pin 2 — Anode (+) | +5V | Direct connection |
| Pin 3 — Green | Arduino PWM pin (e.g., D10) | 100Ω resistor |
| Pin 4 — Blue | Arduino PWM pin (e.g., D11) | 100Ω resistor |
Resistor Calculations
Every LED requires a current-limiting resistor to prevent damage. The formula is:
R = (V_supply − V_forward) / I_forward
Using a 5V supply and a target current of 20mA:
| Color | V_forward | Calculation | Minimum Resistor | Recommended |
|---|---|---|---|---|
| Red | 2.25V | (5 − 2.25) / 0.020 | 137.5Ω | 150Ω |
| Green | 3.5V | (5 − 3.5) / 0.020 | 75Ω | 100Ω |
| Blue | 3.5V | (5 − 3.5) / 0.020 | 75Ω | 100Ω |
💡 Tip: Always round up to the next standard resistor value. Using a slightly higher resistance is safer — it reduces current and extends LED life, with only a minor reduction in brightness. A 220Ω resistor on all three channels is a safe, simple choice if you don't need maximum brightness.
If you're using a 3.3V supply (e.g., ESP32, Raspberry Pi Pico), recalculate accordingly. Note that with 3.3V, the green and blue channels will have very little voltage headroom (3.3V − 3.5V is negative), so these colors may appear dim or not light at all. A 5V supply is recommended for full-color operation.

🚀 Getting Started with Arduino
This example demonstrates how to cycle through several colors using PWM on an Arduino Uno. Remember: with a common anode LED, the PWM logic is inverted — a value of 0 means full brightness and 255 means off.
Wiring Summary
- Red cathode → 150Ω resistor → Arduino pin D9
- Common anode (longest pin) → Arduino 5V
- Green cathode → 100Ω resistor → Arduino pin D10
- Blue cathode → 100Ω resistor → Arduino pin D11
Arduino Sketch — Color Cycle Demo
// 5mm Common Anode RGB LED — Color Cycle Demo
// Envistia Mall | envistiamall.com
const int redPin = 9;
const int greenPin = 10;
const int bluePin = 11;
void setup() {
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
// Red
setColor(0, 255, 255);
delay(1000);
// Green
setColor(255, 0, 255);
delay(1000);
// Blue
setColor(255, 255, 0);
delay(1000);
// Yellow (Red + Green)
setColor(0, 0, 255);
delay(1000);
// Cyan (Green + Blue)
setColor(255, 0, 0);
delay(1000);
// Magenta (Red + Blue)
setColor(0, 255, 0);
delay(1000);
// White (All on)
setColor(0, 0, 0);
delay(1000);
// Off
setColor(255, 255, 255);
delay(1000);
}
// Common Anode: 0 = full on, 255 = off
void setColor(int red, int green, int blue) {
analogWrite(redPin, red);
analogWrite(greenPin, green);
analogWrite(bluePin, blue);
}
💡 Tip: To make the inverted logic easier to work with, you can create a helper function that accepts standard 0–255 values (0 = off, 255 = full on) and inverts them internally:
void setColorStandard(int r, int g, int b) { analogWrite(redPin, 255-r); analogWrite(greenPin, 255-g); analogWrite(bluePin, 255-b); }
Then you can callsetColorStandard(255, 0, 0)for red, which feels more intuitive.
Arduino Sketch — Smooth Rainbow Fade
// 5mm Common Anode RGB LED — Smooth Rainbow Fade
// Envistia Mall | envistiamall.com
const int redPin = 9;
const int greenPin = 10;
const int bluePin = 11;
void setup() {
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
// Fade from Red to Green
for (int i = 0; i <= 255; i++) {
analogWrite(redPin, i); // Red fades out
analogWrite(greenPin, 255 - i); // Green fades in
analogWrite(bluePin, 255); // Blue off
delay(10);
}
// Fade from Green to Blue
for (int i = 0; i <= 255; i++) {
analogWrite(redPin, 255); // Red off
analogWrite(greenPin, i); // Green fades out
analogWrite(bluePin, 255 - i); // Blue fades in
delay(10);
}
// Fade from Blue to Red
for (int i = 0; i <= 255; i++) {
analogWrite(redPin, 255 - i); // Red fades in
analogWrite(greenPin, 255); // Green off
analogWrite(bluePin, i); // Blue fades out
delay(10);
}
}
🎯 Typical Applications
- Status Indicators — Use different colors to indicate device states (green = ready, red = error, blue = processing)
- Mood Lighting — Create ambient lighting effects with smooth color transitions
- LED Art and Displays — Build custom light displays and decorative projects
- Prototyping — Test color feedback systems before committing to a PCB design
- Educational Projects — Learn about PWM, color theory, and basic electronics
- Robotics — Visual feedback for robot states and sensor readings
- Wearable Electronics — Add color-changing LEDs to costumes and accessories
💡 Tips
- Clear vs. Diffused: Use clear LEDs when you need a bright, focused beam (indicator lights, directional signals). Use diffused LEDs when you want even color mixing and a softer glow (mood lighting, displays, projects where the LED is directly visible).
- Color Balancing: The green and blue channels are significantly brighter than red (up to 5000 mcd vs. 1200 mcd). You may need to reduce the green/blue PWM values to achieve balanced white or pastel colors.
- 3.3V Systems: These LEDs work best with a 5V supply. On 3.3V systems, the green and blue channels (Vf = 3.5V) may not light up reliably. Consider using a level shifter or a separate 5V supply for the LED.
- Heat Management: Do not exceed 20mA per channel. Running all three channels at maximum simultaneously draws up to 60mA total — make sure your power supply and microcontroller pins can handle this.
- Breadboard Use: The 4 pins fit standard breadboards. The common anode pin (longest) should be easy to identify even after insertion.
⚠️ Important Notes
- Always use current-limiting resistors — driving an LED without a resistor will destroy it almost instantly.
- Do not exceed 20mA forward current per color channel.
- Observe correct polarity — the common anode pin must connect to positive voltage, not ground.
- These LEDs are not waterproof. Use appropriate enclosures for outdoor or wet environments.
- Avoid looking directly into a clear-lens RGB LED at full brightness — it can be uncomfortable to the eyes.
🛒 Where to Buy
These 5mm Common Anode RGB LEDs are available at Envistia Mall in both clear and diffused packages.
- 📦 Fast US Shipping
- 🔄 Hassle-Free Returns
- 📧 Responsive Customer Support
📚 Additional Resources
- A Simple Guide to RGB LEDs on buildelectroniccircuits
- Interfacing RGB Led with Arduino on the Arduino Project Hub
- Arduino analogWrite() Documentation on the Arduino website
- DigiKey LED Resistor Calculator on the DigiKey website
This guide is provided by Envistia Mall for educational and technical reference purposes. The manufacturer and Envistia LLC (dba Envistia Mall) are not responsible for any damages or losses resulting from the use of this product. Always follow proper electrical safety practices when working with electronic components. Specifications are based on manufacturer data and are subject to change without notice.