?
EE Times-Asia > Controls/MCUs
?
?
Controls/MCUs?? # Grasp the science behind color mixing

Posted: 04 Jul 2012 ?? ? Print Version ?

Keywords:HB LEDs? Colour mixing? linear transformation?

The popularity of high-brightness (HB) LEDs continues to climb as they offer numerous benefits compared to the conventional lighting solutions. One of the advantages of HB LEDs is their ability to generate different colors, opening a new dimension to the world of decorative lighting.

Colour mixing is essentially a process where a secondary colour is generated by mixing the appropriate proportion of base primary colours. This article will explain the science behind colour mixing, including the mathematical equations involved and how to implement them efficiently.

Science behind colour mixing, multi-stimulus space
Primary colours are not a fundamental property of light but are often related to the psychophysical response of the eye to light. It is conceived that primary colours are completely independent from each other and sets of colours that can be combined to generate a useful range (gamut) of colours.

Similar to any other mathematical representations of physical phenomenon, colour models can be expressed in different ways. Each has its advantages and drawbacks. The goal of modelling is to minimise formulation complexity and the number of variables while maximising "substance" and breadth of coverage.

Historically, whatever the meaning assigned to the variables, three of them were enough to describe all colours: RGB, Hue-Saturation-Brightness (HSB), and other HS based models, such as L×a×b and xyY. One common feature was the number of variables or dimensions.

In multi-stimulus space, colour stimuli are denoted by letters, such as Q, R, G, B, and A. Q represents an arbitrary colour stimulus and the letters R, G, B, and A are reserved for fixed primary stimuli chosen for colour matching experiments. The primary stimuli are Red, Green, Blue, and Amber.

A colour matching between a given stimulus Q and the additive mixture in suitable amounts of the fixed various primary stimuli R, G, B, and A can be expressed by vector equation (equation 1):

Q = RQR + GQG + BQB + . . . . + AQA

In multi-dimensional space, a colour stimulus Q is represented by the multi-stimulus vector Q where the scalar multipliers RQ, GQ, BQ, AQ measured in terms of the assigned respective units of given primary stimuli R, G, B, and A respectively are called multi-stimulus values of Q.

The geometric representation in linear multi-dimensional space of equation 1 is shown in figure 1. The unit vectors R, G, B, and A represent the primary stimuli, defining the space. They have a common origin and point in four different directions. Figure 1: Multi-dimensional colour space.

The vector Q has the same origin as R, G, B, and A. Its four components are located along the axes defined by R, G, B, and A, and have lengths respectively equal to RQ, GQ, BQ, and AQ, the multi-stimulus values of Q. The direction and length is obtained by simple vector equation defined by Equation 1. The space defined by R, G, B, and A is called multi-stimulus space. In this space, a colour stimulus Q appears as a multi-stimulus vector (RQ, GQ, BQ, and AQ). In colour mixing algorithm, the firmware calculates what these values should be to derive the colour stimulus Q. Figure 2: CIE chromaticity diagram.

Colour mixing
Figure 2 shows the CIE 1932 colour chromaticity diagram. There are three LEDs, red, green, and blue, plotted in the figure. By mixing appropriate proportion of two primary colours such as red and blue, all colours along the line which joins red and blue can be generated, similarly when blue and green are mixed all the colours along the blue and green line can be generated.

?
?
Webinars Visit Asia Webinars to learn about the latest in technology and get practical design tips.

?
?