Draft:Helmlab
Submission declined on 9 March 2026 by DoubleGrazing (talk). This draft's references do not show that the subject meets Wikipedia's criteria for inclusion. The draft requires multiple published secondary sources that:
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
|
Helmlab is an open-source color space family trained on over 64,000 individual human color perception observations. It is available as Python and JavaScript/TypeScript libraries.[1] It is distributed under the MIT License.[2] The measurement space (MetricSpace) achieves a STRESS value 20.1% lower than the CIEDE2000 standard on the COMBVD dataset; the generation space (GenSpace) offers 6× better hue accuracy than Oklab.[1]
Architecture
Helmlab consists of two color spaces optimized for different purposes:
MetricSpace
MetricSpace (72 parameters) uses a 13-stage transform pipeline optimized for perceptual color difference measurement:
XYZ → M₁ → γ → M₂ → Hue correction → H-K → L → C → HL → NC → φ → Lab
This pipeline converts CIE XYZ tristimulus values to perceptual Lab coordinates. It includes hue correction, Helmholtz–Kohlrausch effect modeling (chroma-dependent lightness, learned from data), chroma scaling, neutral correction, and rigid rotation (φ = −28.2°). The neutral correction stage reduces the chromaticity of grays to C < 10⁻⁶, providing an achromatic guarantee. Rigid rotation reduces hue error at zero cost to the distance metric (RMS 16.1°). Every stage of the pipeline is exactly invertible.[1]
GenSpace
GenSpace (21 parameters) uses a minimal linear-algebra pipeline optimized for color generation (gradients, palettes):
XYZ → M₁ → γ = ⅓ → M₂ → NC → Lab
It uses Phase1H-optimized M₁/M₂ matrices with shared cube-root compression (γ = ⅓). It contains no enrichment stages; the pure linear-algebra pipeline is fast and invertible. Hue accuracy is 6× better than Oklab (RMS 5.2° vs 30.1°). The gradient() function employs CIEDE2000 arc-length reparameterization to produce perceptually uniform steps for any color pair.[1]
Dataset and methodology
COMBVD dataset
COMBVD is a combined visual-difference dataset of 3,813 color pairs compiled from six independent psychophysical experiments:[1]
- Luo and Rigg (1986)
- RIT-DuPont
- Witt
- Leeds
- BFD
- He et al. (2022)
It comprises over 64,000 individual human observations. In each experiment, observers viewed color pairs under controlled D65 illumination and rated the perceived differences.[1]
STRESS metric
STRESS (Standardized Residual Sum of Squares) is the CIE-standard metric for evaluating color difference formulas. For each color pair i, ΔVi denotes the human visual difference and ΔEi the predicted distance. STRESS finds the optimal scale factor F that minimizes the residuals:[1]
Scale: 0 = perfect agreement, 100 = no correlation.
Optimization
The 72 parameters of MetricSpace were optimized on the COMBVD training set using L-BFGS-B with eight random restarts. The data was split 80% training / 20% test (seed = 42). The analytical form of the model—every operation is a known mathematical function—serves as a structural regularizer.[1]
Five-fold cross-validation yields a mean STRESS of approximately 23.5, confirming generalization beyond the training set. Bootstrap confidence intervals (10,000 iterations): Helmlab 95% CI [22.50, 23.93], CIEDE2000 95% CI [27.64, 30.84]. The two intervals have zero overlap (p < 10⁻⁴).[1]
Perceptual distance performance
MetricSpace achieves a STRESS value of 23.30 on the COMBVD dataset. This is 20.1% lower than CIEDE2000's STRESS of 29.18.[1]
| Method | STRESS | vs CIEDE2000 |
|---|---|---|
| Helmlab MetricSpace | 23.30 | −20.1% |
| CIEDE2000 | 29.18 | — |
| CIE94 | 33.59 | +15.1% |
| CAM16-UCS | 33.90 | +16.2% |
| ΔE CMC | 34.04 | +16.6% |
| IPT | 41.21 | +41.3% |
| CIE Lab ΔE76 | 42.80 | +46.7% |
| Oklab | 47.46 | +62.7% |
Gradient uniformity
The table below compares CV (coefficient of variation of CIEDE2000 step sizes). A lower value indicates a more uniform gradient.[1]
| Method | Red→Blue | Orange→Cyan | Black→White | Technique |
|---|---|---|---|---|
Helmlab gradient() |
≈ 0% | ≈ 0% | ≈ 0% | arc-length reparam. |
| Helmlab GenSpace | 3.1% | 33.2% | 41.0% | linear interpolation |
| Oklab | 31.5% | 41.4% | 41.2% | linear interpolation |
| CIE Lab | 44.8% | 52.3% | 61.5% | linear interpolation |
Helmlab's gradient() function achieves ≈ 0% CV via CIEDE2000 arc-length reparameterization, an algorithm that redistributes steps to equal perceptual spacing. The Oklab and CIE Lab values reflect naive linear interpolation, which is how most libraries use them. The same reparameterization technique could be applied to any color space; Helmlab ships it built-in.[1]
Features
- Perceptual color difference measurement (
deltaE) - Achromatic guarantee — grays are mapped to C < 10⁻⁶ chromaticity via neutral correction
- Embedded Helmholtz–Kohlrausch effect — lightness is chroma-dependent, learned from data
- Hue improvement via rigid rotation (RMS 16.1°) at zero cost to the distance metric
- WCAG contrast ratio computation and automatic enforcement
- Gradient generation via CIEDE2000 arc-length reparameterization
- Tailwind CSS-style 50–950 semantic palette generation
- sRGB and Display P3 gamut mapping
- Dark/light mode adaptation
- Design token export (CSS, Android XML, iOS Swift, JSON)
Technical details
The JavaScript package is approximately 12 KB (gzip) with zero external dependencies, and provides ESM + CJS dual output with full TypeScript type definitions.[3] It is also available via CDN. The Python package requires NumPy and SciPy.[4]
The project is verified by 337 automated tests (233 Python + 104 JavaScript).[2]
References
External links
- Official website
- Documentation
- GitHub repository
- arXiv paper
- npm package
- PyPI package
- Helmlab (Türkçe Vikipedi)
Category:Color space Category:Free science software Category:Python (programming language) libraries Category:JavaScript libraries Category:Software using the MIT license
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.

- Reliable sources include: reputable newspapers, magazines, academic journals, and books from respected publishers.
- Unacceptable sources include: personal blogs, social media, predatory publishers, most tabloids, and websites where anyone can contribute.
Replace any unreliable sources with high-quality sources. If you cannot find a reliable source for the material, it should be removed.