High Brightness (HB) LEDs continue to increase in popularity due to the numerous advantages they offer when 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. Color mixing is essentially a process where a secondary color is generated by mixing the appropriate proportion of base primary colors. This article will explain the science behind color mixing, including the mathematical equations involved and how to implement them efficiently.
Science behind color mixing & multi stimulus space Primary colors 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 colors are completely independent from each other and sets of colors that can be combined to generate a useful range (gamut) of colors.
Similar to any other mathematical representations of physical phenomenon, color models can be expressed in different ways. Each has its advantages and drawbacks. The goal of modeling is to minimize formulation complexity and the number of variables while maximizing “substance” and breadth of coverage.
Historically, whatever the meaning assigned to the variables, three of them were enough to describe all colors: 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, color stimuli are denoted by letters, such as Q, R, G, B, and A. Q represents an arbitrary color stimulus and the letters R, G, B, and A are reserved for fixed primary stimuli chosen for color matching experiments. The primary stimuli are Red, Green, Blue, and Amber. A color 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 the following vector equation:
Figure1: Multi-dimensional color space
In multi-dimensional space, a color 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 of Equation 1 in linear multi- dimensional space 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. 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 color stimulus Q appears as a multi-stimulus vector (RQ, GQ, BQ, and AQ).
In color mixing algorithm, the firmware calculates what these values should be to derive the color stimulus Q.
I can see the benefit of the four value color mixing over the three value. It reminds me of the differences between the Kodak film and the Agfa film I used in photography. The Agfa film was like the four value mixing and gave you a warmer picture in almost all cases. The Kodak film often left you with very sharp color effects that distracted from the scene. Especially in the blue spectrum. Often left you with a harsher rendition.
Click on the link below to check out the collection of Design Articles, Case Studies, Product How-To articles, Teardowns, etc... that have been published on Smart Energy Designline.
Check back frequently. The list will be updated as new articles arrive.