SDG Electronics

Lighting engineering · Project report

Beyond RGB. Building an RGBAL architectural light with WLED.

What do the extra white, amber and lime emitters actually add? Where is multi-primary lighting used? How can a custom WLED fork turn a requested colour into four or five calibrated drive channels?

SDG ElectronicsTechnical review: Project repositoryWLED 0.16-dev forkTarget white: 3000 KApprox. 29 minute read
R
G
B
A
L
RGBAL light engine
Measured colour control
00 · Starting point

The short version

Stock WLED provides control and connectivity. The custom fork adds calibrated multi-primary conversion.

This project examines whether WLED, a platform generally associated with decorative LED strips, can form the control basis of a high-quality indoor architectural luminaire. The central challenge is not producing five PWM outputs. It is determining, accurately and repeatably, how those outputs should be combined.

WLED provides networking, presets, effects, a well-developed user interface and a practical route to an ESP32-based prototype. Current WLED supports analogue RGB, RGBW and five-channel RGBCCT outputs, as well as addressable RGBW and selected addressable RGBCCT chipsets.1 This makes the electrical control of a five-output experiment comparatively straightforward.

The limitation is the colour model. Stock WLED stores an RGB colour, one white value and a separate CCT blend. It does not have a native five-channel colour model for red, green, blue, amber and lime. A basic RGBAL prototype can operate from stock WLED, but the firmware does not know how to mix five measured spectra into a particular white, pastel or saturated colour.

The project described here extends that capability. The sdgelectronics/WLED_RGBAL fork adds four- and five-primary PWM buses, a spectrometer-derived lookup table, 16-bit internal channel data and a calibration API. The software and simulation work are complete. Closed-loop measurements on the finished hardware remain outstanding.13

01 · Prototype

Stock WLED supports initial commissioning

The PWM RGBCCT bus can be repurposed by mapping its two nominal white outputs to amber and lime while the optics, thermal design and driver stage are being developed.

02 · Colour engine

The fork adds the missing layer

A measured 17³ lookup table converts ordinary RGB requests into calibrated four- or five-channel drive values after WLED's perceptual processing.

03 · Evidence

The model is promising, not proven

The simulations explain the design choices, but the fixture's spectra, dimming curves, thermal drift and final ΔE still need to be measured on the bench.

01 · Terminology

Terminology and channel definitions

RGBW, RGBWW, RGBCCT, RGBA, RGBL and RGBAL are related, but they address different lighting requirements.

Every extra letter normally means another independently driven emitter colour. The word “normally” matters: LED naming is not standardised consistently across strips, fixtures and marketplaces. A part number and a channel diagram are more trustworthy than the acronym printed in a listing.

SystemPhysical channelsWhat the extra channel is forTypical strengthsTypical applicationsStock WLED fit
RGB 3None: white is made by mixing red, green and blue.Saturated colour, low cost, effects and pixel work.Decorative strips, signage, gaming, pixels and displays.Native
RGBW 4A dedicated white emitter. It may be warm, neutral or cool. “W” alone does not tell us which.More efficient and usually more convincing white than RGB alone.Cove lighting, smart lamps, hospitality and general accent light.Native
RGBWW4 or 5An ambiguous label. “WW” can mean one warm-white channel, or it can be retail shorthand for two white channels.Potentially warm white or tunable white. The data sheet must be checked.Stage fixtures, smart lamps and constant-voltage strip.Depends on the actual channel count
RGBCCT 5Separate warm-white and cool-white channels, blended to change correlated colour temperature.Useful colour plus efficient, adjustable white for daily illumination.Architectural strip, smart bulbs, task lighting and circadian-style scenes.Native as PWM. Selected addressable chipsets are also supported.
RGBA 4Amber supplies a direct warm primary instead of synthesising every orange from red and green.Rich ambers, warmer pastels, tungsten-like looks and useful skin-tone control.Theatre, event wash, scenery, décor and entertainment lighting.Not a native colour model
RGBL 4Lime is commonly a phosphor-converted, relatively broad green-yellow source.Bright pastels and whites, useful mid-spectrum energy and improved rendering potential.Theatre, studio, broadcast, architectural and high-output colour mixing.Not a native colour model
RGBAL 5Amber and lime add two alternative spectral routes through the warm and middle parts of the spectrum.A flexible experimental engine for saturated colour, nuanced pastels and tuneable-looking white recipes.Custom architectural luminaires, theatre, studio experiments and research fixtures.Five outputs can be repurposed. True RGBAL mixing needs custom logic.

RGBW One white

RGB can produce a visual white point, but three narrow peaks often render coloured objects poorly. A dedicated white LED usually contributes a phosphor-generated band of wavelengths, improves luminous efficiency and makes the system more suitable for general illumination.

The trade-off is a fixed white character. A 2700 K white channel will always be warm, and a 6500 K channel will always be cool. RGB can tint either one, but that is not the same as having two measured white endpoints.

RGBCCT Two whites

This is a practical general-purpose configuration for interior lighting. Warm-white and cool-white channels are cross-faded for working, relaxation and camera presets, while RGB provides decorative colour. WLED has explicit support for this model and exposes a CCT control.2

It is usually the easiest route to high-quality white because the white LEDs themselves can be specified for CRI, R9, CCT and Duv.

RGBA Warm primary

Amber is common in stage and event fixtures because it gives the designer a direct route to warm oranges, firelight and low-CCT looks. Commercial RGBA fixtures are used for stages, dance floors, scenery and performers. Current examples quote broad CCT adjustment and CRI above 90.7

An amber channel does not, by itself, guarantee high-quality white. Its dominant wavelength, bandwidth and balance against the other emitters remain important.

RGBL Middle spectrum

Lime is useful because it can provide a broad, efficient contribution through the green-yellow region where human vision is very sensitive. ETC uses RGBL in compact theatrical fixtures to produce bright colour and high-quality white, while Luminus positions RGBL packages specifically for stage and architectural lighting.89

It can improve pastel brightness and create a smoother-looking route to white than narrow RGB peaks alone.

So why combine amber and lime?

RGBAL gives the mixer more choices. An amber target can use the amber emitter rather than wasting output in a red-plus-green compromise. A near-white or pale colour can lean on lime for efficient mid-spectrum energy, while amber helps warm objects and skin. The extra degrees of freedom can be used to optimise brightness, colour rendition, electrical load or thermal headroom.

What it does not do automatically is make the outer colour gamut larger. Amber and lime may sit inside the triangle formed by the RGB primaries on a chromaticity diagram. Their value is often spectral quality and efficiency inside that gamut, not simply a larger polygon.

02 · Context

Where it is used

Additional primaries are most valuable when a fixture must illuminate real materials, rather than simply produce coloured light.

Architectural interiors

Coves, niches, feature walls, reception areas and hospitality spaces need attractive colour but spend much of their life producing believable white.

Theatre and events

Designers want saturated colours, gel-like pastels, flattering skin and smooth transitions without swapping filters or fixtures.

Film, broadcast and video

Colour rendition, tint control, silent cooling and flicker behaviour matter as much as what the light looks like to the eye.

Retail and display

Food, timber, fabric, paint and skin all expose holes in a light’s spectrum. A matching CCT alone cannot guarantee they look right.

That last point is the reason multi-primary lighting exists. Two light sources can land on nearly the same chromaticity and CCT while producing very different spectral power distributions. Objects then reflect those spectra differently, so one source can make timber, red paint or skin look lively while the other makes it look flat.

CRI is still a familiar shorthand, but it compresses a complicated subject into one average. TM-30 adds fidelity (Rf), gamut (Rg) and hue-specific information. The US Department of Energy’s review found that TM-30-based criteria captured preference better than the older single-number approaches in the studies it analysed.10

03 · Firmware

What WLED actually understands

Five pins do not equal five independent colour primaries.

WLED’s documented light capabilities are RGB, white and CCT. Its JSON colour array contains three or four bytes for RGB or RGBW, while CCT is held as a separate value for each segment.3 That works well for RGBCCT. The fourth value sets the amount of white, and the CCT value divides it between the warm-white and cool-white emitters.

The official compatibility page dates analogue single-colour, CCT, RGB, RGBW and RGBCCT support to WLED 0.13.1. It also lists addressable WS2805 and FW1906 RGBCCT support from 0.15.0-b2.1 Those are genuine five-channel lighting modes, but they still use the RGB-plus-white-and-temperature model rather than a general five-primary colour vector.

The current PWM bus code makes this explicit. The five-channel type is labelled PWM RGBCCT. It writes RGB directly, calculates the warm-white and cold-white values, then sends them to channels four and five.4

WLED colour requestR · G · B · WOne four-byte colour, used by the UI, effects and JSON API.
Separate controlCCT 0…255A relative position between the two nominal white endpoints.
Physical PWMR · G · B · WW · CWFive outputs, but the last pair is generated as a coupled blend.

What happens if WW and CW become amber and lime?

Electrically, it works. Map the nominal warm-white output to amber and the nominal cold-white output to lime. The WLED white slider now controls how much amber/lime contribution is requested, while the CCT slider moves the balance from amber to lime.

For a prototype, this is useful, but it is still an approximation. WLED continues to treat the two channels as a white-temperature pair. Auto-white can add them whenever it extracts white from RGB. Effects also tend to generate RGB values, so they may not use the extra pair in the way a five-primary mixer would. The CCT additive-blending setting changes how strongly both channels can be driven near the centre. WLED notes that high additive blending can increase heat and reduce LED life.2

Repurpose the RGBCCT bus

Configure one five-channel PWM output, wire WW → amber and CW → lime, set auto-white to None while characterising the hardware, and use solid presets. This is the fastest route to a coherent five-emitter demo.

Best forPrototype, optics, thermals and the YouTube build

Expose channels as separate buses

Separate one-channel PWM buses or segments can be useful for commissioning each emitter and measuring its output. It is cumbersome as a finished user interface and does not create a unified colour engine.

Best forElectrical test and raw channel measurements

Add a calibrated RGBAL mixer

Keep WLED for network control and presets, but translate its requested RGB/white scene into five linear drive values using measured data. This can live in a custom bus/core patch or in a companion controller.

Best forA repeatable architectural luminaire
Example JSON for the preliminary RGBCCT-to-RGBAL mapping

These examples assume a solid effect, amber connected to the warm-white PWM output, lime connected to the cold-white output, and WLED auto-white set to None. The actual amber/lime split also depends on the configured CCT blending mode.

Amber end, RGB off:

{"on":true,"bri":160,"seg":[{"id":0,"fx":0,"col":[[0,0,0,255]],"cct":0}]}

Mixed RGB plus an amber-biased amber/lime contribution:

{"on":true,"bri":160,"seg":[{"id":0,"fx":0,"col":[[180,35,8,140]],"cct":96}]}

These are control examples, not calibrated colour recipes. Save measured looks as WLED presets once the hardware is stable.

04 · Colour science

The useful bit of maths

Five primaries give us choices. The mixer decides whether those choices become quality or chaos.

At a fixed temperature and current, additive light is conveniently linear. Measure the CIE XYZ contribution of each emitter and place those measurements into a matrix. A requested target can then be expressed as a weighted mix of the five channels:

Three tristimulus targets and five controls mean that several valid mixtures can produce the same chromaticity and brightness. That freedom is why the extra channels are useful. The solver can favour a mixture that uses less power, stays within channel limits, reduces spectral discontinuities, balances junction temperatures or more closely matches a reference illuminant.

A practical solver uses non-negative channel values and respects current limits. It also needs measured dimming curves because PWM duty, optical output and the human impression of brightness are three different things.

Chromaticity matching is not spectral matching

The XYZ matrix can place the beam at a specified white point, but CRI and TM-30 depend on the complete spectral power distribution. Two mathematically matching white points can render objects differently. A calibrated mixer therefore needs a second objective based on measured spectra. The alternative is to use carefully measured recipes rather than claim universal colourimetric accuracy.

Direct mode versus calibrated mode

Direct control remains useful for bench measurements and for selecting individual emitters. It should not be confused with fixture-to-fixture matching. Professional manufacturers measure and calibrate individual luminaires because LED wavelength and output vary by bin and temperature. Even nominally identical emitters are not perfectly identical.11

05 · Project data

What the original modelling found

Amber and lime do not extend the RGB chromaticity triangle, but they can substantially improve output within it.

A central finding of the project is that amber and phosphor-converted lime normally sit inside the triangle formed by red, green and blue on a CIE chromaticity diagram. They do not automatically add a new boundary colour. Their value is that they provide brighter and spectrally fuller ways to reach colours that RGB could already match.

The first model used the Cree XNPAPL package: red around 625 nm, green around 528 nm, royal-blue territory around 458 nm and a modelled PC-lime peak around 558 nm. For those primaries, adding lime left the chromaticity hull area unchanged to four decimal places. Yet the predicted brightness and colour-rendering results changed dramatically.13

CIE 1931 chromaticity diagram for the modelled Cree XNPAPL emittersThe red, green and blue primaries form a triangle. The phosphor-converted lime primary and the 3000 kelvin white point both sit inside that triangle.0.00.20.40.60.8CIE 1931 x0.00.20.40.60.8CIE 1931 y460480500520560580600620Planckian locusRed 625 nmGreen 528 nmBlue 458 nmPC Lime 558 nm3000 K white
Figure 1. Modelled CIE 1931 chromaticity geometry for the Cree XNPAPL package. The PC-lime primary lies inside the triangle formed by the package's red, green and blue emitters. It therefore leaves the outer chromaticity gamut unchanged while providing a different spectral and luminance route to colours within that gamut. Coordinates are calculated from the modelled emitter spectra and remain subject to verification on the finished hardware.13
Modelled targetRGB onlyWith amber + limeChangeWhat it means
Amber chromaticity7,48839,7975.31×A direct amber route avoids an inefficient red-green mixture.
Lime chromaticity15,24591,1005.98×PC lime puts broad output close to the eye's peak sensitivity.
D65 white15,48526,1181.69×The same white point can be reached with substantially more light.
CRI Ra at D6538.668.7+30.1Broad emitters fill some of the spectral holes between narrow RGB peaks.

The emitter choices are deliberately different

The first hardware is RGBL rather than the final five-colour fixture. A four-die Cree package places every source within one optical footprint, which simplifies colour mixing and makes it an appropriate first board. The RGBAL version uses discrete emitters and gains flexibility at the cost of more demanding mechanical and optical alignment.

CandidateChannelsSelection rationaleMain compromise
Cree XNPAPLRGB + PC LimeFirst build. Four dies share one package and one optical centre.It proves RGBL, not a complete RGBAL engine.
Cree XNPAPARGB + PC AmberA direct warm channel and a potentially stronger route to some warm whites.The project model predicted much lower efficacy and weak R9.
LUXEON C, discreteR/G/B or royal blue/A/LA genuine five-channel RGBAL arrangement with freedom to choose every primary.Several source positions make beam homogenisation much harder.

Why the working white point became 3000 K

The project swept the Planckian locus from 2200 K to 6500 K using the modelled emitters. In that calculation, 3000 K gave the best overall balance of CRI Ra, TM-30 Rf and saturated-red rendering R9. The 2700 K recipe improved Ra by only 0.1 point but reduced R9 by almost 12 points. That is a poor trade for skin, timber and other warm materials.

White pointCRI RaTM-30 RfR9Model efficacy
2200 K85.287.770.597.6 lm/W
2700 K91.088.285.3104.1 lm/W
3000 K (selected)90.988.097.1106.8 lm/W
3500 K90.287.494.4109.7 lm/W
4000 K89.786.794.2111.3 lm/W
5000 K89.485.691.3112.4 lm/W
6500 K88.884.288.8111.4 lm/W

Two findings of particular relevance to the video

Royal blue really can change the gamut. Unlike amber and lime, swapping blue for a shorter-wavelength royal blue moves an outer vertex of the RGB triangle. The project model predicted about 4.8% more chromaticity area, along with better TM-30 Rf and efficacy. Standard blue retained a small Ra advantage, which is a useful reminder that Ra and TM-30 do not ask the same question.

An optimised warm-white recipe may exclude the green die. At and below 3000 K, the model's best white switched the narrow green emitter off. Broad lime peaked in approximately the same region and provided the required luminance more efficiently. Green remains important for saturated greens and cyans, but it was not the preferred contributor to this particular white recipe.

06 · Firmware fork

Where the conversion goes

Let WLED make the scene. Let a measured lookup table turn that scene into emitter currents.

The fork avoids teaching hundreds of effects about amber and lime. In the reported WLED 0.16-dev codebase, WLED applies its perceptual processing before the PWM bus sees the colour. The multi-primary bus then receives a linear-light RGB request, interpolates the calibrated table and produces four or five physical channel values.13

FX
WLED sceneEffects, presets, API and UI remain familiar
LIN
Linear-light RGBPerceptual curve is applied before the bus conversion
LUT
Measured profile17³ cube with tetrahedral interpolation
OUT
RGBL or RGBALFour or five 16-bit internal drive values
Part of the projectWhat has been implementedWhy it mattersStatus in the supplied report
Multi-primary busesFour-pin RGB+X and five-pin RGBAL PWM types, 16-bit internal channel data and a raw-drive override.Supports normal rendering and direct per-die bench measurements through the same firmware.Built and CI-tested
Calibration profileA 17³ binary LUT on LittleFS, CRC validation, tetrahedral interpolation and hot-loading without a reboot.Keeps fixture-specific measurements out of firmware while preserving a safe pass-through mode.Built and simulated
Host toolchainSpectral ingest, CIE integration, emitter models, convex optimisation, gamut mapping, smoothing and profile generation.The heavy colour science runs offline instead of inside every ESP32 frame.Built and test-covered
Closed-loop verificationCommand known colours, measure the finished beam and compare output against intent using ΔE 2000.This is the step that turns an internally consistent model into a calibrated luminaire.Waiting for hardware
Firmware cost

+4.3 kB flash

The supplied report records eight additional bytes of RAM on the classic ESP32 build.

Compatibility work

29 build targets

All reported CI targets passed, including ESP8266 and the ESP32 S3, C3, C5 and P4 variants.

Interpolator check

33,000 points

The firmware and Python reference interpolators reportedly agreed with zero least-significant-bit difference.

Drive-space trade-off stored in the lookup tableA line through a two-channel drive space shows several combinations that produce the same colour. The endpoints favour efficacy and spectral fidelity. The selected lookup-table value lies between them.lime drive →red drive →011maximum efficacymaximum spectral fidelityvalue stored in the LUTEvery point on theorange segment gives thesame colour to the eye.None gives the samespectrum.5 drives - 3 colourconstraints = 2 sparedimensions, 1 shownDRIVE SPACE, CLIPPED TO 0-1
Figure 3. Why the mixer has a choice to make. The colour equation fixes three values, but the fixture has four or five independently controlled emitters. Several drive combinations can therefore produce the same colour while differing in efficacy and spectral quality. The offline optimiser selects the required balance, and that result is stored in the lookup table. At the luminance ceiling, the available range contracts towards a single point, which explains why the final increase in brightness can carry a large colour-quality penalty.13
Why the fork uses this particular architecture
  1. A lookup table, not a runtime optimiser. Five primaries and three colour constraints leave a family of possible mixtures. Choosing among them can be expensive. Interpolating a pre-solved 17³ grid is inexpensive.
  2. Tetrahedral, not trilinear, interpolation. The project measured far less neutral-axis drift with tetrahedra, where even a small cast is easy to see.
  3. The profile lives on LittleFS. The roughly 48 kB table is fixture-specific data and should not consume compile-time flash headroom or require a firmware rebuild.
  4. The table is indexed in linear light. This makes the mapping easier to approximate and prevents a user-adjusted display gamma from silently invalidating the calibration.
  5. Internal channel values are 16-bit. Low-level five-primary mixtures often rely on small differences between channels. Keeping more precision avoids throwing away timer resolution before the PWM stage.
  6. New bus identifiers come from a reserved block. The fork uses types 96 and 97 so ordinary upstream PWM numbering remains untouched.

What the simulation says so far

For the modelled Cree RGBL fixture at 3000 K, the 17³ profile reported CRI 89.1, TM-30 Rf 87.8 and a 3005 K white. Of 4,913 grid points, 327, or 6.7%, needed gamut mapping. Across 2,898 in-gamut test colours passed through the quantised LUT, the reported mean ΔE 2000 was 0.02 and the maximum was 1.40.13

These low interpolation errors indicate that the lookup-table implementation adds little error relative to its underlying model. They do not demonstrate that the emitter model itself is accurate. Low numerical error within an inaccurate spectral model would still produce inaccurate output.

07 · Hardware

Proposed build architecture

Design it as a luminaire first and a WLED project second.

UI
WLED on ESP32Wi-Fi, presets, scenes and API
MIX
Colour mappingInitial CCT mapping, followed by calibrated RGBAL conversion
PWM
Four or five drive channelsLevel shift, gates and current control
LED
Optical engineCree RGBL first, followed by discrete RGBAL

Controller

Use an ESP32 rather than an ESP8266 for this build. It provides adequate processing headroom, LittleFS capacity for the calibration profile and a substantially more camera-compatible default PWM frequency in WLED. Keep the controller thermally and electrically separated from the high-current LED stage where practical.

Output stage

WLED’s GPIOs are control signals, not LED power outputs. A constant-voltage strip needs a suitable switching device per channel, while high-power emitters need regulated constant-current drivers. Include defined off-state bias, gate or input resistors, hardware current limits, fusing and a safe power-up state. WLED’s own analogue-strip guidance also stresses external MOSFET circuitry and protection against overload and over-temperature.1

Thermal design

Characterise the worst credible mixture, not merely one emitter at full output. A centre blend can activate amber and lime together, and a custom RGBAL recipe may operate several channels at high current. Place a temperature sensor near the LED substrate, apply controlled thermal derating and test after the heatsink reaches equilibrium. Colour shifts as the engine warms, so thermal stability is also colour stability.

Optics

Several visible source colours need a proper mixing distance, reflector or homogenising optic. The four-die Cree package gives the first RGBL build a shared optical footprint. The discrete RGBAL version will be less forgiving. A diffuser can hide the individual emitters when viewed head-on yet still cast coloured shadows onto nearby objects. Test beam uniformity at the actual installation distance, including the edge of the field and at low dim levels.

Specify the actual emitter wavelengths, white-point data and bins, rather than relying on labels such as “red”, “amber” and “lime”.
Measure every channel’s current, optical output and case temperature at several duty cycles.
Set hardware current limits independently of WLED’s software brightness limiter.
Size the supply for the permitted simultaneous-channel case, including an appropriate design margin.
Provide fusing, reverse-polarity protection and a predictable output state during boot or Wi-Fi failure.
Keep PWM return currents and LED wiring away from the ESP32 antenna and sensitive measurement paths.
Test the diffuser and housing for hot spots, coloured fringes and safe touch temperatures.
For a permanently installed or mains-powered product, design and test against the applicable safety and EMC requirements.
08 · Video

PWM and the camera

A light can look perfectly steady to us and still produce rolling bands on YouTube.

WLED’s documentation lists a default analogue PWM frequency of 19,531 Hz on ESP32, compared with 880 Hz on ESP8266.1 This is an important reason to use ESP32. The frequency is high enough to avoid many common camera artefacts, but it does not provide a universal guarantee: shutter time, frame rate, rolling-shutter readout, PWM depth, driver behaviour and low-duty operation can still interact.

Higher PWM frequency also trades against PWM resolution and switching loss. WLED’s current bus code derives available bit depth from the PWM frequency and clock, so “as high as possible” is not automatically the best setting.4

Test every intended frame rateRecord the finished light at the actual 25/30/50/60 fps modes and shutter settings planned for the video.
Sweep the dimming rangeBanding can appear at low duty cycles even when full output looks clean. Test 1%, 5%, 10%, 25%, 50% and 100%.
Test colours, not just whiteDifferent channel duties can create colour banding that a neutral full-output test misses.
Use a fast diagnostic modeHigh-frame-rate or slow-motion footage can expose modulation and rolling bands quickly, even if it is not the final shooting mode.
Measure the waveformA photodiode and oscilloscope reveal frequency, duty and unexpected driver behaviour more reliably than eyeballing the beam.
Lock the cameraUse manual exposure and white balance during comparison shots so the camera does not disguise or invent differences.

The broader flicker literature is clear that frequency is only one variable. Modulation depth, duty cycle and waveform also matter, particularly when the light is being recorded by a camera. The US Department of Energy recommends testing across the dimming range and measuring the actual output rather than assuming a driver is flicker-free.12

09 · Commissioning

A calibration workflow that is achievable

Warm it up, measure it, build recipes, then try very hard to break them.

Closed-loop calibration workflowThe host commands a known emitter duty, the fixture produces light, a spectrometer captures the spectrum, and the host builds and solves a channel model. The resulting lookup table is uploaded to the device and verified by re-measurement.HOST: Python toolchainDEVICE: ESP32 firmwareBENCH: fixture and spectrometer01Commandone emitter,exact duty02Driveraw override,no gamma curve03CaptureAvaSpec 2048-2,channel x level04Modelspectra to XYZ,flux vs duty05Solve4,913 convex QPsabout 6 seconds06Deployvalidate and load,no rebootHTTPlightSPD3 x NLUTVerify: command known colours, re-measure and calculate Delta E 2000Residual error updates the channel model before the cube is solved againAFTER CALIBRATIONRGB request to linear-light conversion to LUT interpolation to four or five PWM duties
Figure 2. Closed-loop calibration workflow. Physical measurements are used to replace the provisional emitter model, generate a fixture-specific lookup table and verify the rendered output. The final return path is essential because it measures the complete luminaire rather than assuming that the model, driver and optics behave ideally.13
  1. Stabilise the mechanics, currents and temperature. Finalise the heatsink, optic, drive current and permitted simultaneous-channel load. Record cold-start drift and wait for thermal equilibrium before building the profile.
  2. Drive one emitter at a known duty. The fork's raw override bypasses the LUT, auto-white handling and WLED's perceptual brightness curve. That bypass matters: without it, a nominal 50% request can be closer to 12% duty and the calibration would learn the wrong transfer function.
  3. Capture every spectrum at several levels. The planned Avantes AvaSpec 2048-2 measures each die while duty is swept. Measuring the levels matters because driver droop, LED heating and supply sag can bend the flux-versus-duty curve.
  4. Build the real channel model. Integrate each spectrum against the CIE colour-matching functions to obtain its XYZ contribution. Stack those results into the 3×N matrix and replace the provisional emitter model with the finished fixture's data.
  5. Choose white point and headroom. Sweep the available luminance ceiling and choose the knee where more brightness starts costing a disproportionate amount of colour quality.
  6. Solve the colour cube. The current toolchain solves 4,913 small convex problems for the 17³ grid. In-gamut points balance colour, rendering and efficiency. Out-of-gamut requests are reduced in chroma while hue and lightness are held as steady as possible.
  7. Upload safely. The device checks the profile signature, version, geometry and CRC, then hot-loads it. A bad file is rejected and the previous calibration remains active.
  8. Close the loop. Command known colours, re-measure the beam and report ΔE 2000 against intent. Repeat at low output, after thermal soak and across the expected ambient range.
  9. Turn measurements into presets. Put the proven architectural and camera looks into WLED so the YouTube demo and final installation recall exactly the same states.

Why an 85% luminance ceiling can improve overall performance

At the absolute luminance ceiling, the three colour constraints can completely determine the channel mix. The optimiser has no freedom left to improve the spectrum. Backing away from that ceiling gives it room to choose a better mixture.

Headroom settingRelative luminanceCRI RaTM-30 RfR9Model efficacy
1.00100%80.286.935.798.2 lm/W
0.9090%86.588.060.1101.5 lm/W
0.85 (selected knee)85%89.187.873.5103.3 lm/W
0.8080%89.187.873.5103.3 lm/W

In the model, giving up 15% of peak luminance bought 8.9 CRI points, nearly 38 R9 points and about 5% better efficacy. WLED's master brightness then scales all channels together, so the spectral mix chosen at the top of the curve remains relevant at every lower brightness.13

What if there is no spectrometer?

A tristimulus colour meter can provide useful xy/uv and luminance data for the basic mixing matrix. It cannot reveal spectral discontinuities or calculate reliable rendering metrics without spectral information. A camera or phone is useful for demonstrating the result, but it is not suitable as the only calibration instrument. For one comprehensive calibration session, borrowing or hiring a spectrometer is likely to provide more value than another iteration of unmeasured firmware.

10 · Review

Resolved errors and remaining risks

The development report documents four credible errors that initially produced plausible results.

The fidelity objective was incorrectly specified Fixed

Minimising raw spectral distance from a 3000 K blackbody over-weighted red and infrared energy that the LEDs could not produce. The optimiser responded by driving amber at a high level. The original fidelity solution scored CRI 82.9, while a power-minimised mix scored 87.2.

The fix was to compare what the candidate spectrum does to 99 real reflectance samples. That keeps the optimisation convex while making the target about rendered objects rather than a visually unhelpful wavelength-by-wavelength match.

The colour-space API was misread Fixed

The colour-science CIELAB conversion expected the reference illuminant as xy chromaticity, not XYZ. Passing the wrong form produced a white with b* around 1805 and impossible chroma values around 1351.

After the correction, out-of-gamut hue error fell to 0.0° in the reported tests and the maximum LUT error fell from a meaningless 6.67 to 1.40.

The verifier measured its own mismatch Fixed

The accuracy check created its reference by trilinear interpolation while the firmware read the LUT tetrahedrally. It was reporting the difference between two interpolation methods as if it were colour error.

Smoothing damaged the white it protected Fixed

Independent solutions can change abruptly when a constraint becomes active, so smoothing initially appeared appropriate. When applied globally, however, it moved the selected white point towards neighbouring compromises and reduced CRI by approximately seven points.

The revised method smooths hard where the solution is arbitrary and very lightly on the neutral axis where the mixture is deliberate.

What can still go wrong on the real fixture

  • Ambiguous naming: RGBWW does not tell us whether there are four or five controllable channels.
  • Common-anode versus common-cathode hardware: the wrong driver topology or polarity setting produces more than a software problem.
  • Auto-white surprises: WLED can derive white from RGB. In the repurposed RGBAL mapping, that means it may add amber or lime unexpectedly. Use manual white during characterisation.
  • CCT blend heat: additive centre blending can run both secondary channels hard. Current-limit and thermally test that case.
  • Power estimation: WLED’s brightness limiter is useful, but a custom high-power analogue engine still needs hardware limits and a supply sized from measured loads.
  • Thermal colour drift: flux and wavelength move with temperature. A temperature-stable fixture is easier to calibrate and easier to match.
  • Optical separation: a diffuser that appears uniform at ten centimetres can still cast separated colour shadows at the wall.
  • Low-level dimming: the bottom few per cent expose PWM resolution, driver turn-on thresholds, channel mismatch and camera banding.
  • Calibration by eye: our visual system adapts quickly. Side-by-side references and instruments prevent “looks about right” from becoming a permanent coefficient table.
  • Network exposure: WLED is a convenient local controller. Do not expose a luminaire’s web interface directly to the public internet.
11 · Conclusion

Engineering conclusion

RGBAL is valuable because it provides more efficient and spectrally effective routes to a required colour.

RGB supplies the edges. Amber gives warmth without a red-green compromise. Lime fills a useful, efficient part of the middle spectrum. Together they create a flexible platform for an architectural light that can do bold colour and far more nuanced pale light than a basic RGB engine.

WLED is a suitable foundation because it already provides Wi-Fi provisioning, a developed interface, presets, APIs and effects. Stock WLED's RGBCCT path is useful during initial hardware commissioning. The custom fork then adds the required fixture-specific conversion from ordinary colour requests to measured RGBL or RGBAL drive values.

The supplied project results make a strong engineering case, but they are still model results. The first Cree XNPAPL RGBL board, its real lime spectrum, PWM waveforms, optical mixing and closed-loop ΔE measurements will decide whether the model survives contact with the bench.

It also gives the YouTube video a clear structure. Start with the familiar WLED control system, then explain why five physical outputs are not the same as five-primary colour management. The key demonstrations are the unchanged gamut triangle, the green channel switching off in warm white, and the improvement in colour quality gained by reducing peak luminance by 15%.

Together, these results show how an experimental colour fixture can be developed into a repeatable architectural luminaire.

Primary, official and project references

Sources used for the technical review

  1. WLED Project: Compatible LED strips. Lists supported addressable and analogue types, RGBCCT support, MOSFET guidance and default PWM frequencies.
  2. WLED Project: White handling. Documents auto-white modes, CCT control and additive-blending thermal cautions.
  3. WLED Project: JSON API. Defines RGB(W) colour arrays, light capabilities and the separate per-segment CCT value.
  4. WLED source: bus_manager.cpp. Current PWM RGBCCT implementation and CCT channel calculation.
  5. WLED source: project README. Current overview of supported hardware, RGBW/RGB+CCT and control interfaces.
  6. PROLIGHTS: EclPar IPLFC, and WLED issue #3608: WS2805 RGBW+WW support. Two examples showing why “WW” must be checked against the actual channel definition.
  7. ADJ: Par Z300 RGBA. Commercial red, green, blue and amber stage fixture, use cases and published colour-rendering data.
  8. ETC: ColorSource PAR jr. A commercial RGBL fixture used for stage and on-camera work.
  9. Luminus Devices: RGBL colour-mix LED technology. Manufacturer information on lime-channel packages for stage and architectural fixtures.
  10. US Department of Energy / PNNL: Analysis of Color Rendition Specification Criteria. Review of CRI, TM-30 and colour-preference criteria.
  11. ETC: LED fixture colour calibration and matching. LED binning, calibration, gamut and direct-mode limitations.
  12. US Department of Energy / PNNL: Flicker: How to Avoid It, Test for It, and Fix It. PWM, temporal modulation, imaging concerns and practical testing.
  13. SDG Electronics: RGBAL: Multi-Primary LED Control in WLED, supplied project report, updated captured source and project repository, 12 August 2026. Source for the fork architecture, emitter models, simulated photometric and colour-quality results, test status and hardware caveats reproduced here.

External technical pages were checked on 12 August 2026. Product examples illustrate how the channel systems are used and are not endorsements. All project figures identified as modelled or simulated came from the supplied RGBAL report and remain provisional until repeated on finished hardware. Component limits and WLED behaviour should be rechecked against the exact firmware revision, LED data sheets and final hardware before construction.