Skip to main content

3MM 4 Pin Common Anode Diffused Nipple-Package RGB LED

< All Topics

3MM 4PIN DIFFUSED RGB TRI-COLOR RED GREEN BLUE LEDS COMMON ANODE NIPPLE PKGRGB LEDs are actually three LEDs, red, green, and blue, inside one package. Instead of 2 wires coming out, there are 4 wires coming out: The longest one is + Voltage (in these Common Anode diodes), and the 3 others correspond to red, green, and blue.

By varying the brightness of each LED, a single RGB LED can display the full spectrum of color. A specific color can be set through the choice of resistors in series with each color wire. By using the PWM outputs of an Arduino or other microcontroller, the brightness of each of the three LEDs can be controlled independently. A PWM value of 0.0 would be off and a 1.0 full on for each color LED. This allows a program to vary both the color and brightness level of the LED, providing dynamic control of the LED’s output color and brightness.

These LEDs, often called “nipple-package” or “dome-package” LEDs, are commonly used for per-key backlighting in mechanical keyboards.

Specifications

3mm RGB LED Pinout
ParameterValue
Package3mm Nipple
Forward Voltage Vf (V)
Red1.9 – 2.1V
Green3.1 – 3.3V
Blue3 – 3.2V
Working Current20 mA
Dominant Wavelength
Red620-625
Green520-525
Blue460-470
Luminous Intensity (mcd)
Red600-1000
Green3000-4000
Blue600-800
Viewing Angle30 degrees
Tested at IF=20mA

Wiring and Operation

+V is connected to the anode pin “2”, Ground is connected to the remaining three pins corresponding to each color. 

A voltage dropping resistor is needed to drop the output voltage of a digital logic signal to the operating voltage of the LED and to limit the current. See the example at left.  These resistor values are examples only. The values required for your application may vary. The value of the required dropping resistor can be calculated so that it drops down the voltage by the required amount from the digital logic output level (5 or 3.3V). Resistor values are typically around 100-330 ohms. The three LEDs inside a single RGB LED have different operating voltages. The voltage drop tends to rise as the frequency of the light wave increases.

3mm RGB LED Schematic

The equations used to compute the correct resistance for an LED can be found in this Wikipedia series resistance formula:  http://envistia.info/wikiledcalc

or use this web page calculator:  http://envistia.info/digikeyledcalc

Understanding RGB vs. RBG LEDs in Keyboard Lighting

What’s the Difference?

RGB and RBG LEDs differ in their pin configuration – specifically, the order of their leads:

RGB LEDs: Red → Anode (common +V) → Green → Blue
RBG LEDs: Red → Anode (common +V) → Blue → Green

The key difference is that the green and blue leads are swapped between the two types. See the illustration below.

Why This Matters for Keyboard Builds

Through-hole LEDs (often called “nipple-package” or “dome-package” LEDs) are commonly used for per-key backlighting in mechanical keyboards. Each keyboard PCB is designed with specific pad layouts that match either RGB or RBG pin configurations.

The Compatibility Issue

Most keyboards use RGB LEDs, but some manufacturers design their PCBs for RBG configurations. Here’s what happens if you mismatch them:

  • ✅ The LED will physically fit and light up
  • ❌ Colors will be incorrect: Green and blue will be swapped
    • When your firmware calls for blue, you’ll get green
    • When your firmware calls for green, you’ll get blue
    • Red will work correctly (same position in both types)

This creates confusing lighting effects where your color schemes display incorrectly—cyan appears yellow, magenta appears red, and so on.

Before You Buy

Always verify your keyboard’s LED type before purchasing replacements:

  1. Check your keyboard’s documentation or PCB specifications
  2. Look for existing LED markings or community build guides
  3. When in doubt, contact the manufacturer or check enthusiast forums

Ordering the wrong type means functional LEDs with incorrect colors—a frustrating outcome that’s easily avoided with proper verification.

Additional Resources

A Simple Guide to RGB LEDs” on buildelectroniccircuits.

Interfacing RGB Led with Arduino” on the Arduino Project Hub.

Where to Buy the 3MM 4 Pin RGB LEDs

3MM 4pin Diffused RGB Tri-Color Red Green Blue LEDs Common Anode Nipple Pkg at Envistia Mall

Copyright © 2017-2026 Envistia Mall
www.envistiamall.com

EM-LEDLI-0005-DI

Table of Contents