Pic RGB LED Color Calibration


rgb mixOverview

After using Power Pic RGB circuits for a while it seems that some colors were missing. While it is possible to produce powerful Red, Green and Blue, some colors like Yellow or Purple, are simply not showing up properly.

Yellow is the result of mixing  Red and Green in equal parts, but when setting Hue to equal parts of Red and Green, the resulting "Yellow" is rather green. "Purple", on the other hand tends to be rather Red.

So it seems there's an imbalance in the intensity of the three components produced by the RGB LED and while this can be corrected in software, trying to calibrate the colors on the PWM modulator will only result in loss of resolution, since the PWM engine is limited to 64 levels of PWM.

Another method of calibration I find to work well is to make sure each RGB component on the LED outputs the same amount of light (Lumens) when at its maximum. This is achieved by recalculating the resistors for the LED.

Calibration by equalizing the lumens for the 3 components

The datasheet for the Prolight PL6N-3LFX RGB LED [1] shed some light (pun intended) on the Lumens each color component outputs:

Color Current Vf (typ) Luminous Flux
Red 350mA 2.2V 30lm
Green 350mA 3.5V 52lm
Blue 350mA 3.5V 12lm


It's now obvious why "yellow" is so much green and "purple" looks almost like red.

Another good thing that the datasheet shows is that the current vs luminous flux variation is almost linear and with the same slope. This means that we can normalize the luminous flux simply by reducing the current of red and green based on the value of blue.

So let's normalize the flux to the lowest value of the three components: 12lm from blue.

Color  Luminous Flux Correction Factor  Corrected Maximum Current
Red 30lm  30lm / 12lm = 2.5 350mA / 2.5 = 140mA
Green 52lm  52lm / 12lm = 4.3(3) 350mA / 4.3(3) = 80.8mA
Blue 12lm no need, it's 1 350mA


Now with the corrected current values already determined we need to calculate the resistors for each color component. Looking at the datasheet again there's a nice set of charts showing the LED voltage vs current. And it shows that we need to take the current reduction into account because it changes the LEDs forward voltage. 

Color Corrected Maximum Current Corrected Vf Corrected Luminous Flux Obs
Red 140mA 2.0V 12lm Aprox ~150mA
Green 80.8mA 3.0V 12lm Aprox ~100mA
Blue 350mA 3.5V 12lm Original value


And now the final calculations to determine the resistors:

Color Vcc Corrected Vf Corrected Maximum Current Resistor Value Resistor Power Rating Aproximated Value Obs
Red 5.0V 2.0V 140mA (5.0 - 2.0) / 0.14 = 21.4Ω 21.4Ω * 0.14^2 = 0.42W 22Ω @ ½W or more -
Green 5.0V 3.0V 80.8mA (5.0 - 3.0) / 0.0808 = 24.8Ω 24.8 * 0.0808^2 = 0.016W 24Ω @ ¼W or more 2 * 12Ω in series
Blue 5.0V 3.5V 350mA (5.0 - 3.5) / 0.35 = 4.3Ω 4.3 * 0.35^2 = 0.53W 4.4Ω @ 1W or more 2 * 2.2Ω in series


And that's it, after replacing the resistors on the Power Pic RGB board I'm finally getting colors like yellow, pink and purple. The resolution of the circuit seems to have improved and even though I'm using less current on the LED I don't notice the amount of light is reduced.



  1. Prolight PL6N-3LFX RGB LED datasheet
  2. HTML Special Characters
  3. The E12 Series


Published on Friday 2010/09/10, last modified on Wednesday 2014/10/15