shows the CIE 1932 color chromaticity diagram. There are three LEDs, red, green, and blue plotted in the figure. By mixing appropriate proportion of two primary colors such as red and blue, all colors along the line which joins red and blue can be generated, similarly when blue and green are mixed all the colors along the blue and green line can be generated. Color mixing these three LEDs can generate any color that lies within this triangle. This area is called the color gamut. However, in the CIE 1931 standard the color distribution is not homogeneous and contains discontinuities. Therefore, linear transformation cannot be applied to decide the proportion of primary color required to generate the desired secondary color.
Figure 2: CIE chromaticity diagram
Color mixing algorithm
In color mixing applications, the firmware inputs values in CIE chromaticity coordinate form. It converts the coordinates into appropriate dimming values for each LED channel. A dimming value is simply the percentage of maximum luminous flux to which an LED must be dimmed. If the current of an LED is quickly switched on and off in an intelligent fashion, the LED has its flux output controlled.
The firmware combines this coordinate with its preprogrammed knowledge of the characteristics of the LEDs in the system. It then completes the necessary transfer function that correctly converts the chromaticity coordinate into a dimming value for each LED. This process enables their light outputs to mix together to create the color of the chromaticity coordinate input into the system.
Multi-channel color mixing In a three-channel color mix, if the color points of three LEDs are mapped onto the CIE 1931 chart, it forms a triangle. If the three LEDs are red, green, and blue then the triangle formed is called the color gamut (see Figure 2
). The area inside the triangle is the gamut of achievable colors with this particular set of three LEDs. Any (x, y) coordinate within the triangle is input into the system. This provides a broad range and high resolution of unique colors that is produced with this system. Four-channel color mixing solution is based on the principle of superposition. It uses three-channel color mixing algorithm as its base. For four-channel color mixing, if the color points of four LEDs are mapped onto a color space chart, it becomes apparent that there are exactly four triangles formed by the lines drawn between the four LED color points. See Figure 3
Figure 3: Superposition on four-channel color mixing
The method described here is easily expandable to more than four LED colors. In Figure 3
, the four triangles are made up of the following LED triplets: TR1(R,G,B), TR2(R,A,B), TR3(R,G,A), and TR4(G,A,B).
Each triangle is solved for dimming values using three-channel color mixing functions. Out of these four triangles two give all non negative dimming values and two have one or all dimming values negative. Triangles with any or all negatives values are not valid and are discarded. Dimming arrays with all positive values are accumulated. The interpretation of negative dimming values is that the desired point lies outside the triangle formed by three basic colors. For example, in Figure 4
, RGB triangle returns all non negative values for P1; for P2, at least one dimming value is negative.
Two positive dimming values for each desired color are added and scaled appropriately. A negative dimming value implies that the desired color is not inside the gamut so that cannot be generated using the particular base colors.
Figure 4: Positive and negative dimming values