Helmlab: A Two-Space Family of Analytical, Data-Driven Color Spaces for UI Design Systems
Organizations: Independent Researcher
Abstract
We present Helmlab, a family of two purpose-built color spaces for UI design systems sharing a common 11-stage analytical structure: MetricSpace, a 72-parameter space optimized for color-difference prediction, and GenSpace, a 44-parameter space optimized for gradient and palette generation. The forward transform maps CIE XYZ to a perceptually-organized Lab representation through learned matrices, per-channel power compression, Fourier hue correction, and embedded Helmholtz-Kohlrausch lightness adjustment. A post-pipeline neutral correction holds gray-axis chroma below 1e-5 on a 21-step ramp, and a rigid rotation of the chromatic plane improves hue-angle alignment without affecting the distance metric (which is invariant under isometries). On COMBVD (3,813 color pairs), MetricSpace v21 achieves STRESS 22.48, a 23 percent reduction from CIEDE2000 (29.20). On the held-out MacAdam 1974 dataset it scores 19.51 (CIEDE2000: 22.13; CAM16-UCS leads at 18.71). On a self-collected 3,552-judgement screen-condition set it scores 23.26 vs 62.54 for CIEDE2000. On academic He et al. 2022 (82 3D-printed pairs) MetricSpace scores 35.9 vs CIEDE2000 32.6, a regression we own. Averaging the three primary datasets, MetricSpace scores 21.75 vs the next-best baseline CIECAM02-UCS at 35.98. GenSpace v0.11.1 trades distance accuracy for generation quality: on a 90-metric, 3,038-pair gradient/palette benchmark across sRGB, P3, and Rec.2020, it wins 65 of 90 vs OKLab. The transform is invertible with round-trip errors below 1e-13. Production implementations ship on PyPI, npm, Color.js (PR 722, merged), and as a PostCSS plugin.
Figures & tables
| Method | combvd | MacAdam | HumFB | Avg |
|---|---|---|---|---|
| MetricSpace v21 | 22.48 | 19.51 | 23.26 | 21.75 |
| CIE94 | 33.37 | 19.78 | 59.75 | 37.63 |
| CIEDE2000 | 29.20 | 22.13 | 62.54 | 37.96 |
| DIN99 | 35.57 | 23.31 | 56.44 | 38.44 |
| 41.92 | 24.14 | 61.74 | 42.60 | |
| CIE Lab ( ) | 42.86 | 24.53 | 62.32 | 43.24 |
| Property | Value |
|---|---|
| Achromatic max (NC on) | |
| Hue RMS (6 sRGB primaries) | 26.4° |
| Hue max error | 53.4° |
| Round-trip (sRGB) | 7 10 -15 |
| Round-trip (random XYZ) | 1 10 -13 |
| Munsell CV (3,590 iso-hue pairs) | 32.0% |
| Configuration | COMBVD stress | |
|---|---|---|
| Full MetricSpace v21 | 22.48 | — |
| Euclidean distance only | 27.6 | |
| No H-K embedding | 26.5 | |
| No hue correction (Stage 4) | 37.9 | |
| No dark-L compression | 22.7 | |
| Rotation ° | 22.48 | 0.00 |
| Sub-dataset | v21 | CIEDE2000 | |
|---|---|---|---|
| BFD-P(C) | 200 | 29.08 | 29.08 |
| BFD-P(D65) | 2,028 | 21.54 | 24.09 |
| BFD-P(M) | 548 | 21.75 | 35.23 |
| LEEDS | 307 | 21.84 | 19.25 |
| RIT-DuPont | 312 | 21.90 | 19.47 |
| WITT | 418 | 30.93 | 30.22 |
| Category | GenSpace | OKLab | Ties |
|---|---|---|---|
| Gamut geometry | 24 | 0 | 3 |
| Application | 9 | 0 | 3 |
| Gradient quality | 7 | 3 | 1 |
| Independent † | 6 | 1 | 0 |
| Perceptual | 5 | 0 | 0 |
| Structural | 4 | 2 | 2 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Stage | Parameter | Value | Description |
| (9) | Row 0 | [ 0.7213, 0.4534, 0.1929] | XYZ cone-like |
| Row 1 | [ 0.7882, 1.7952, 0.0876] | ||
| Row 2 | [ 0.0918, 0.4577, 1.2922] | ||
| (3) | 0.4723, 0.5149, 0.5113 | Signed power compression | |
| (9) | Row 0 | [ 0.2636, 0.4168, 0.4927] | Compressed Lab |
| Row 1 | [ 1.8898, 3.1212, 1.0422] |
| Stage | Value |
|---|---|
| 3 3, see JSON (Bradford CAT pre-baked) | |
| Transfer | depcubic, |
| 3 3, see JSON | |
| Chroma power | 0.978 |
| PW correction | 19-point dense, see JSON |
| Enrichment | L-gated hue rotation |