Color Reproduction and Color Spaces
Prerequisites
Signal Chain -> this page -> Color Accuracy Analyzer
Color spaces matter in image sensor work because a sensor does not measure "red", "green", and "blue" in the same way the eye or an sRGB display defines them. A CIS pixel measures three device-dependent spectral integrals. Color reproduction is the process of turning those integrals into a standard colorimetric space, usually CIE XYZ, then into a display or evaluation space such as sRGB or CIE Lab.
For COMPASS, this page is the bridge between optical simulation and image-quality metrics:
- Electromagnetic or browser models produce channel spectral response.
- Scene spectra and illuminants are integrated through that response.
- White balance and a color correction matrix map camera RGB to XYZ.
- Lab and color-difference metrics quantify the remaining error.
Sensor Color Is Spectral Matching
For channel
where:
is the end-to-end spectral response of channel . is camera lens transmittance. is the IR-cut filter transmittance. is the color filter transmittance. is optical absorption in the target photodiode region. is the carrier collection efficiency after absorption.
For a surface patch
This equation is the core reason color is a sensor-design topic. CFA thickness, dye spectrum, microlens focus, DTI leakage, IR-cut slope, and silicon absorption depth all change
Camera RGB is not display RGB
Raw camera RGB is a device-dependent coordinate system. Its axes are the sensor channel responses, not the CIE standard observer primaries and not the sRGB display primaries. Treating raw RGB as sRGB hides illuminant dependence, metameric error, and CFA trade-offs.
CIE XYZ Reference Color
CIE XYZ is the usual device-independent reference for color reproduction. Given the same illuminant and surface reflectance, the reference tristimulus vector is:
where:
, , and are the CIE standard observer color matching functions. is a normalization constant, often chosen so the reference white has or . corresponds to photopic luminance in the CIE system.
Chromaticity removes absolute luminance:
The CIE 1931 chromaticity diagram used by the color-filter simulator plots these
White Balance
White balance removes the first-order illuminant cast by forcing a neutral target to become neutral after channel scaling. If a neutral patch has raw response
The balanced camera vector is:
where
White balance alone cannot make the sensor match the human observer. It equalizes one white point, but it does not fix spectral mismatch across colored objects. That residual mismatch is handled by a color correction matrix.
Color Correction Matrix
A 3x3 color correction matrix (CCM) maps white-balanced camera RGB into a target color space. For sensor evaluation, the target is usually XYZ:
The matrix is fit from calibration patches:
where:
is the white-balanced camera vector for patch . is the reference CIE XYZ vector. is an optional patch weight. is the least-squares CCM.
In matrix form, with camera samples
If the calibration set is noisy or poorly conditioned, ridge regularization is more stable:
The CCM can hide some optical compromises, but it cannot recover information that the sensor never measured. If two different spectra produce the same camera RGB but different XYZ values, no 3x3 matrix can separate them.
Metamerism and Spectral Mismatch
Two spectra are metamers for a sensor when they produce the same camera response:
They are visually equivalent only if the same equality also holds for the CIE color matching functions. Color error appears when a pair is a camera metamer but not a human-observer metamer, or the reverse.
This is why CFA spectra cannot be optimized only for narrow, saturated primaries. Very narrow RGB filters can increase chromatic separation, but they often reduce signal and can make color correction unstable under LED, fluorescent, or mixed illuminants. Broad filters increase sensitivity but reduce channel independence. The practical design target is a balanced spectral response that supports stable CCM fitting across expected illuminants and materials.
From XYZ to sRGB
sRGB is a display-referred encoding. After estimating XYZ, a D65-adapted XYZ value can be converted to linear sRGB with:
The nonlinear sRGB code value for each clipped linear component
where
Lab and Color Difference
CIE Lab is derived from XYZ relative to a reference white
with:
The simple 1976 color difference is:
CIEDE2000, often written
Sensor Design Implications
Color reproduction constrains optical stack design in several ways:
| Design choice | Color consequence |
|---|---|
| CFA center wavelength and bandwidth | Sets channel separation, sensitivity, and CCM conditioning. |
| CFA thickness and relief | Changes both spectral passband and angular response, so off-axis color can differ from center-field color. |
| Microlens focus and CRA shift | Alters which photodiode collects each wavelength and can create color shading near the image edge. |
| IR-cut transition | Residual NIR leaks into all channels, reducing saturation and corrupting white balance. |
| Silicon thickness and absorption depth | Blue light is absorbed shallowly while red/NIR penetrates deeper, affecting crosstalk and channel balance. |
| Noise and clipping | CCM coefficients can amplify noisy channels, while saturated channels destroy chromatic information. |
A robust color design should therefore be evaluated with spectra, not only with RGB endpoint intuition. The minimum useful evaluation set is:
- D65 and Illuminant A, plus the LED or fluorescent spectra relevant to the product.
- A neutral scale for white balance and exposure.
- A patch set with known reflectance spectra, such as a ColorChecker-style target.
- Color error before and after CCM.
- SNR or noise-amplification checks after the CCM.
COMPASS Workflow
Use the pages in this order when connecting optical simulation to color:
- Pixel Optical Effects for CFA, CRA, crosstalk, and stack-level effects.
- Quantum Efficiency for converting absorbed power into channel spectral response.
- Signal Chain for illuminant, scene reflectance, lens, IR filter, and electron signal.
- Color Filter Designer for quick spectral-shape and gamut exploration.
- Color Accuracy Analyzer for CCM fitting and color-error intuition.
- Signal Chain Color Accuracy for an end-to-end recipe.
For a production sensor, the browser simulators are early design and communication tools. Sign-off requires measured CFA spectra, module transmittance, dark/flat-field calibration, realistic illuminant sets, and validation against silicon images.
References
- CIE 015:2018, Colorimetry, 4th Edition defines the standard colorimetric observers, illuminants, tristimulus calculations, color spaces, and color-difference practices used here.
- IEC 61966-2-1:1999, Default RGB colour space - sRGB defines the sRGB color space and encoding used for display-referred RGB.
- Sharma, Wu, and Dalal, "The CIEDE2000 Color-Difference Formula: Implementation Notes, Supplementary Test Data, and Mathematical Observations" is the practical implementation reference for
. - NIST, "Color By Numbers" explains why spectral responsivity mismatch affects color measurement accuracy.