---
title: 'HELMLAB: Data-Driven Color Space for UI Design'
url: https://www.emergentmind.com/topics/helmlab
type: topic
---

# HELMLAB: Data-Driven Color Space for UI Design

HELMLAB is a data-driven analytical color space for UI design systems, formulated as a 72-parameter pipeline from CIE XYZ to a perceptually organized Lab-like representation and paired with a learned perceptual distance function. It is designed for screen-based work in sRGB and Display-P3 under D65 / average surround assumptions, with explicit attention to three practical requirements: accurate color-difference prediction, a clean achromatic axis for grayscale ramps, and usable hue geometry for programmatic palette generation and design-token workflows. On the COMBVD dataset of 3,813 color pairs, the reported STRESS is 23.22, compared with 29.18 for CIEDE2000, corresponding to a 20.4% reduction; the transform is also reported to be invertible with round-trip errors below \(10^{-14}\), and its neutral correction drives achromatic outputs to \(a=b=0\) with chroma below \(10^{-6}\) [2602.23010].

## 1. Problem setting and design objectives

HELMLAB was introduced to address a conjunction of requirements that the paper treats as insufficiently satisfied by standard spaces when used in UI design systems: perceptual distance prediction for contrast and spacing, a neutral axis that does not leak chroma into grayscale ramps, and hue geometry that behaves sensibly under interpolation and token generation [2602.23010].

The paper positions HELMLAB against CIE Lab, CIEDE2000, Oklab, CAM16-UCS, IPT, and Jzazbz. CIEDE2000 is treated as a standard for color-difference evaluation, but not as a learned end-to-end space-transform-plus-metric system. Oklab is described as simple and useful for CSS, but optimized for hue uniformity rather than psychophysical distance prediction. CAM16-UCS is presented as having stronger appearance-model grounding, but as being computationally heavier and, in the author’s measurements, as leaking chroma on neutral colors. IPT and Jzazbz are described as having other strengths without being targeted at UI design workflows. The paper argues that no prior space jointly optimizes both the space transform and the distance metric end-to-end against psychophysical data; HELMLAB is presented as a direct response to that gap [2602.23010].

Its intended scope is explicitly screen-based rather than general-purpose. A plausible implication is that HELMLAB should be read not as a universal replacement for all color-difference formalisms, but as an application-specific construction aimed at web, mobile, and tokenized design-system pipelines.

## 2. Analytical structure of the forward transform

The forward transform maps CIE XYZ to \((L,a,b)\) through a sequence of learned linear transforms and nonlinear corrections. The parameterization is explicitly decomposed into nine blocks summing to 72 parameters [2602.23010].

| Component | Role | Parameters |
|---|---|---:|
| First matrix | XYZ-to-cone-like transform | 9 |
| Power exponents | Per-channel signed compression | 3 |
| Second matrix | Opponent / Lab projection | 9 |
| Hue correction | 4-harmonic Fourier correction | 8 |
| Helmholtz–Kohlrausch terms | Chroma-dependent lightness adjustment | 6 |
| Lightness refinement | Cubic and dark-region corrections | 8 |
| Chroma processing | Hue-, chroma-, and \(L\)-dependent corrections | 18 |
| Hue–lightness terms | Final hue-linked lightness modulation | 4 |
| Metric parameters | Distance function | 7 |

The first stage uses a learned \(3\times 3\) matrix:
$$
\mathbf{c} = \mathbf{M}_1
\begin{bmatrix}
X\\Y\\Z
\end{bmatrix}.
$$
This is followed by per-channel signed power compression,
$$
c_i' = \mathrm{sign}(c_i)\,|c_i|^{\gamma_i},
$$
with appendix values reported as approximately \(\gamma_0=0.395\), \(\gamma_1=0.421\), and \(\gamma_2=0.434\). A second learned matrix then yields raw Lab-like coordinates. The paper characterizes these exponents as being near 0.4, i.e. between cube-root and square-root compression [2602.23010].

Hue is then corrected with a 4-harmonic Fourier term,
$$
\delta(h)=\sum_{k=1}^{4}\bigl[\alpha_k\cos(kh)+\beta_k\sin(kh)\bigr],\qquad
h=\mathrm{atan2}(b,a),
$$
which rotates the chromatic vector while preserving chroma. HELMLAB also embeds a Helmholtz–Kohlrausch lightness correction,
$$
L \mathrel{+}= w_{\mathrm{HK}} \cdot C^{p_{\mathrm{HK}} \cdot [1 + f_{\mathrm{HK}}(h)]},
\qquad
C=\sqrt{a^2+b^2},
$$
with fitted values \(w_{\mathrm{HK}}=0.37\) and \(p_{\mathrm{HK}}=0.85\). The paper treats this as a major design choice because it makes lightness explicitly depend on chroma rather than assuming separability [2602.23010].

Further stages refine lightness through a cubic term, hue-dependent correction, and a dark-region exponential adjustment. Chroma then undergoes interleaved hue-dependent scaling, nonlinear chroma power, \(L\)-dependent scaling, and a final hue\(\times\)lightness interaction. The paper emphasizes that these chroma stages are interleaved rather than merely stacked, so later stages can compensate for distortions introduced earlier [2602.23010].

Two post-pipeline operations are central to usability. First, a neutral correction computes achromatic error over 256 gray levels spanning \(Y\in[0.001,2.0]\) and subtracts it via PCHIP interpolants:
$$
a \leftarrow a-a_{\mathrm{err}}(L), \qquad
b \leftarrow b-b_{\mathrm{err}}(L).
$$
Second, the chromatic plane is rigidly rotated by
$$
\varphi=-28.2^\circ.
$$
The paper states that this improves hue placement of sRGB primaries and secondaries while leaving the distance metric unchanged [2602.23010].

## 3. Learned distance metric and rotational invariance

HELMLAB does not use plain Euclidean distance in \((L,a,b)\). Instead, it defines a learned perceptual distance in which the lightness and chroma terms are rescaled by pair-dependent factors [2602.23010]:
$$
S_L = 1 + s_L(\bar{L}-0.5)^2, \qquad
S_C = 1 + s_C \bar{C},
$$
where \(\bar{L}\) and \(\bar{C}\) are pair averages. The raw distance is
$$
d = \left[\left(\frac{\Delta L}{S_L}\right)^2 + w_C \frac{\Delta a^2+\Delta b^2}{S_C^2}\right]^{p/2},
$$
followed by the compressive post-transform
$$
\Delta E = \left[\frac{d}{1+c\cdot d}\right]^q.
$$
The learned parameter values are reported approximately as \(s_L \approx 9.16\times 10^{-5}\), \(s_C=0.0045\), \(p=0.829\), \(w_C=1.028\), \(c=1.588\), and \(q=1.100\) [2602.23010].

A distinctive theoretical property is exact invariance of this metric under rigid rotations in the \(ab\)-plane. The paper notes that the metric depends only on \(\Delta L\), \(\Delta a^2+\Delta b^2\), \(\bar{L}\), and \(\bar{C}=\sqrt{\bar{a}^2+\bar{b}^2}\). Because a rigid rotation preserves both \(\Delta a^2+\Delta b^2\) and \(\bar{a}^2+\bar{b}^2\), the metric is unchanged. This is why the final chromatic-plane rotation can improve hue-angle alignment without altering the measured color distance; the reported COMBVD STRESS difference before and after rotation is 0.0000000000 [2602.23010].

This separation between perceptual metric and chromatic-plane orientation is one of the paper’s main conceptual moves. It suggests that palette geometry can be tuned independently of distance fidelity, provided the tuning is restricted to an isometry.

## 4. Optimization procedure and empirical evaluation

The full 72-parameter system is optimized jointly with the loss
$$
\mathcal{L} = \mathrm{STRESS}_{\mathrm{combvd}} + 0.05\cdot \mathrm{STRESS}_{\mathrm{He}},
$$
using L-BFGS-B with box constraints, 8 random restarts, and about 5,000 iterations each. The paper reports typical convergence within 3,000–5,000 function evaluations per restart, and a train–validation STRESS gap of \(+1.11\), which it interprets as some overfitting but not severe [2602.23010].

The evaluation metric is STRESS,
$$
\mathrm{STRESS}=100\sqrt{\frac{\sum_i(DV_i-F\cdot \Delta E_i)^2}{\sum_i DV_i^2}},
\qquad
F=\frac{\sum DV_i\Delta E_i}{\sum \Delta E_i^2},
$$
with lower values better. The main benchmark is COMBVD, comprising 3,813 color pairs from six psychophysical experiments [2602.23010].

On COMBVD, the reported values are: HELMLAB 23.22, CIEDE2000 29.18, CIE76 42.80, CIE94 33.59, CMC 34.04, CAM16-UCS (Euclidean) 33.90, IPT (Euclidean) 41.21, Jzazbz (Euclidean) 41.90, Oklab (Euclidean) 47.46, and sRGB (Euclidean) 67.82. The paper further reports 10,000-iteration paired bootstrap confidence intervals of \([22.50,23.93]\) for HELMLAB and \([27.64,30.84]\) for CIEDE2000, states that the intervals do not overlap, and gives \(p<10^{-4}\) [2602.23010].

Cross-dataset results are more qualified. On He et al. 2022, which has 82 pairs, HELMLAB scores 29.0 versus 32.6 for CIEDE2000. On MacAdam 1974, with 128 pairs, HELMLAB scores 20.2, while CAM16-UCS is best at 18.7. The paper is explicit that HELMLAB is not universally best across all datasets and is tuned primarily to COMBVD [2602.23010].

A common misconception would be to treat the COMBVD result as evidence of universal dominance. The paper does not support that conclusion. Its stronger claim is narrower: HELMLAB is competitive across datasets while being optimized mainly for COMBVD and for UI-oriented usability constraints.

## 5. Invertibility and design-system tooling

HELMLAB is constructed to be invertible stage by stage. The learned matrices invert by matrix inversion; the signed power law inverts as
$$
c_i = \mathrm{sign}(c_i')|c_i'|^{1/\gamma_i};
$$
hue and lightness corrections invert by Newton iteration; and the neutral correction inverts by adding back the interpolated achromatic error [2602.23010].

The reported round-trip accuracy over the full sRGB gamut is
$$
\|T^{-1}(T(\mathbf{x}))-\mathbf{x}\|_\infty < 10^{-14},
$$
and a Jacobian check on a \(64\times 64\times 64\) sRGB grid gives a minimum determinant of 0.10. The paper interprets this as local invertibility and orientation preservation over the tested gamut [2602.23010].

The same work includes practical utilities oriented toward design systems. Out-of-gamut HELMLAB coordinates are mapped back to sRGB or Display-P3 by binary-search chroma reduction along the \(L\) axis, preserving hue and lightness as much as possible. A utility `ensure_contrast(fg, bg, min_ratio)` adjusts foreground lightness by binary search on the HELMLAB \(L\) axis until WCAG 2.x contrast thresholds are met, while preserving hue and chroma. Palette generation is described in terms of lightness ramps, hue rings, and semantic token scales such as Tailwind-style 50–950 ramps, generated by interpolating \(L\) between roughly 0.97 and 0.10 while preserving hue/chroma structure [2602.23010].

Dark/light mode adaptation is present architecturally through a surround parameter \(S\), but the paper states that it is not yet trained on viewing-condition data. The current implementation instead uses heuristic soft \(L\)-inversion, with typical surrogate values such as light mode \(S=0.7\) and dark mode \(S=0.2\). Exporters are provided for CSS custom properties, `oklch()` and `color(display-p3 ...)`, Android XML, iOS Swift, Tailwind config, and raw JSON [2602.23010].

## 6. Limitations, trade-offs, and interpretation

The paper is explicit about HELMLAB’s limitations. First, its training data are biased toward COMBVD and the 2° standard observer, so generalization to large-field settings is uncertain. Second, the model’s 72 parameters make it considerably more complex than simpler spaces such as Oklab. Third, hue alignment is improved but not perfect: the reported RMS hue error is 16.1°, with some regions, especially cyan and yellow, reaching about 20°. Fourth, surround dependence is architectural rather than empirically trained; current dark/light mode handling is heuristic. Fifth, HELMLAB underperforms CIEDE2000 on some COMBVD subsets, including BFD-P(C), Leeds, and RIT-DuPont. Sixth, it is not presented as a general-purpose space for print, photography, or spectral applications [2602.23010].

The most significant trade-off identified in the paper is between measurement optimality and generation usability. An unconstrained, measurement-optimal model deformed the achromatic axis so that grays were no longer neutral in the output space. The neutral correction was added to resolve that tension by post-correcting the achromatic axis while preserving the optimized distance behavior. This suggests a broader methodological point: for UI systems, perceptual accuracy alone is insufficient if the resulting space behaves poorly for grayscale interpolation, ramp construction, and token generation [2602.23010].

Within that framing, HELMLAB is best understood as a learned, analytical, invertible color space plus perceptual metric for screen-based design systems. Its reported strengths are the COMBVD STRESS of 23.22, exact neutral suppression to below \(10^{-6}\) chroma, round-trip error below \(10^{-14}\), and integrated support for gamut mapping, contrast enforcement, and token export. Its principal trade-offs are complexity, residual hue error, and specialization to UI-oriented use rather than universal color science [2602.23010].

Source: https://www.emergentmind.com/topics/helmlab