We are using RGB LEDs in our product and we require to emit white light to indicate a certain state. But because of the tolerance of the resistors and the LED itself it is hard to achieve the same white color in all the devices(some are reddish white, some are yellowish). We are driving the RGB leds using PWM with 255 duty cycle.
In order to solve this we decided to use a color sensor to calibrate each RGB led on the product using a color sensor(We are using http://wiki.seeed.cc/Grove-I2C_Color_Sensor/) . What we would like to do is to store a calibration value that corrects R, G and B (e.g. by some multiplication factor) so that mixing of colors can be achieved accurately for not just white but any color. But unfortunately color sensor channels(RGB) data and its correlation to PWM value is not straight forward from what we understand. Could anybody help us out with a solution.
Thanks in Advance, Prasad