Kubelka-Munk: pigment reflectance · RGB: additive light · CIELab: D65 weighted · OKLab: perceptually uniform
K/S values are theoretical approximations from sRGB. Real pigments depend on concentration, substrate, and binder.
Per-channel reflectance breakdown for each colorant and final mix.
| Space | Values | Notes |
|---|
Brettel/Viénot dichromacy + Machado anomalous trichromacy. ΔE₀₀ impact per type.
JSON includes: target hex, mixing mode, colorant list with
concentrations,
mixed result (HEX, RGB, CMYK, Lab, OKLab), all color space conversions.
CSV provides: Target, Mode, Result HEX, R, G, B, C, M, Y, K, L*, a*,
b*.
Kubelka-Munk Reflectance Theory
The Kubelka-Munk (K-M) two-flux model relates the intrinsic absorption coefficient K and scattering coefficient S of a turbid medium to its observable reflectance R. For opaque layers over a substrate, a single ratio K/S fully predicts reflectance. Colorant mixtures follow a linear rule: the K/S of a mixture is the concentration-weighted sum of each component’s K/S.
This model is the basis for pigment formulation in paint, ink, textile dyeing, and cosmetics. The tool approximates K/S from sRGB values, which is valid for qualitative recipe exploration but should not replace spectrophotometric measurements for production work.
R = 1 + K/S − √(K/S² + 2·K/S)
(K/S)_mix = Σ cᵢ · (K/S)ᵢ (concentrations sum to 1)
IEC 61966-2-1 — sRGB Colour Space
sRGB (IEC 61966-2-1:1999) is the standard RGB colour space for the web and consumer displays. It defines primaries, a D65 white point, and a transfer function (gamma ≈ 2.2). RGB additive mixing must be performed in linear (pre-gamma) space, then re-encoded to sRGB for display.
C_lin = ((C+0.055)/1.055)^2.4 else
Encode: C = 12.92·L if L ≤ 0.0031308
C = 1.055·L^(1/2.4) − 0.055 else
CIE 15:2004 — CIELab & Colorimetry
CIELab (L*a*b*) is the CIE’s standard perceptually-uniform colour space. L* is lightness (0 = black, 100 = white), a* is green–red, b* is blue–yellow. D65 is the reference illuminant. CIELab blending produces smoother gradients than RGB for many hue regions.
CIE LCh is the polar form: L* = lightness, C* = chroma (saturation), h° = hue angle.
OKLab (Ottosson 2020) — Perceptual Colour Space
OKLab improves on CIELab with better perceptual uniformity for hue and lightness. It was designed for image processing and procedural colour generation. Blending in OKLab avoids the blue-shift artefacts common in CIELab interpolation and produces more natural gradients.
OKLCh (polar form) is used by this tool’s harmony and ladder engines.
CIEDE2000 — Colour Difference
CIEDE2000 (ΔE₀₀) is the gold standard for perceptual colour difference. It corrects the L*, chroma, and hue non-uniformities of ΔE*ab with five correction factors: lightness weighting SL, chroma weighting SC, hue weighting SH, a chroma-dependent G factor, and a hue rotation term RT for the blue region.
ΔE₀₀ 1–2 — barely perceptible
ΔE₀₀ 2–10 — noticeable
ΔE₀₀ > 10 — distinct colours
CVD Simulation — Brettel / Viénot / Machado
Colour Vision Deficiency affects ~8% of men. The tool simulates 8 types:
- Protanopia / Protanomaly — L-cone absent / anomalous (red-blind)
- Deuteranopia / Deuteranomaly — M-cone absent / anomalous (green-blind)
- Tritanopia / Tritanomaly — S-cone absent / anomalous (blue-blind)
- Achromatopsia / Achromatomaly — all / partial cone loss
The simulation chain is: sRGB → linear → XYZ (D65) → LMS (Hunt-Pointer-Estévez) → CVD matrix → inverse chain.
ISO 12647-2 — CMYK Process Print
CMYK conversion approximates print-process separation (Cyan, Magenta, Yellow, Key/Black). This tool uses a simple ICC-independent calculation: K = 1 − max(R,G,B), then C = (1−R−K) / (1−K), etc. Industrial print workflows require ICC profiles and spectrophotometric verification per ISO 12647-2.
Kubelka-Munk Reflectance Mixing
K/S = (1 − R)² / (2R)
Reflectance from K/S:
R = 1 + K/S − √((K/S)² + 2·K/S)
Mixture rule (concentrations c₁…cₙ):
(K/S)_mix = Σ cᵢ · (K/S)ᵢ
Σ cᵢ = 1
Kubelka & Munk, Z. f. technische Physik, 12, 593–601, 1931.
sRGB Linearization & Additive Mixing
C_lin = C / 12.92 if C ≤ 0.04045
C_lin = ((C + 0.055) / 1.055)^2.4 else
Linear → sRGB:
C = 12.92 · L if L ≤ 0.0031308
C = 1.055 · L^(1/2.4) − 0.055 else
Additive mix (weighted average in linear space):
R_mix = Σ wᵢ · Rᵢ_lin → re-encode to sRGB
CIE XYZ ↔ sRGB Matrix
[X] [0.4125 0.3576 0.1804] [R_lin]
[Y] = [0.2127 0.7152 0.0722] [G_lin]
[Z] [0.0193 0.1192 0.9503] [B_lin]
XYZ → Linear sRGB:
[R_lin] [ 3.2405 -1.5372 -0.4985] [X]
[G_lin] = [-0.9693 1.8760 0.0416] [Y]
[B_lin] [ 0.0556 -0.2040 1.0572] [Z]
CIE L*a*b* & LCh
a* = 500·[f(X/Xn) − f(Y/Yn)]
b* = 200·[f(Y/Yn) − f(Z/Zn)]
f(t) = t^(1/3) if t > 0.008856
f(t) = 7.787·t + 16/116 otherwise
LCh (polar):
C* = √(a*² + b*²)
h° = atan2(b*, a*) · 180/π
OKLab & OKLCh (Ottosson 2020)
l = 0.4122·R + 0.5363·G + 0.0514·B
m = 0.2119·R + 0.6807·G + 0.1074·B
s = 0.0883·R + 0.2817·G + 0.6300·B
Cube root: l′ = ³√l, m′ = ³√m, s′ = ³√s
OKLab:
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′
a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′
b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′
OKLCh: C = √(a²+b²) H = atan2(b,a)·180/π
CIEDE2000 (ΔE₀₀)
+ RT·(ΔC′/kc·Sc)·(ΔH′/kH·SH)]
Weighting functions:
Sₗ = 1 + 0.015·(L̄−50)²/√(20+(L̄−50)²)
Sc = 1 + 0.045·C̄′
SH = 1 + 0.015·C̄′·T
T depends on H̄′
RT = hue-rotation term (strongest near H′≈275°)
Sharma, Wu, Dalal, Color Res. App. 30(1), 21–30, 2005.
CVD Simulation Chain
HPE (Hunt-Pointer-Estévez) LMS matrix:
[L] [ 0.4002 0.7076 -0.0808] [X]
[M] = [-0.2263 1.1653 0.0457] [Y]
[S] [ 0.0000 0.0000 0.9182] [Z]
Viénot dichromacy (e.g. protanopia in LMS):
[L′] [0.0000 2.0234 -2.5258] [L]
[M′] = [0.0000 1.0000 0.0000] [M]
[S′] [0.0000 0.0000 1.0000] [S]
Machado anomalous (severity s ∈ [0,1]):
C_sim = (1−s)·C_normal + s·C_dichromat
Kubelka-Munk & Pigment Mixing
[2] P. Kubelka — “New Contributions to the Optics of Intensely Light-Scattering Materials. Part I,” JOSA, 38(5), 448–457, 1948.
CIE Colorimetry & Color Difference
[4] G. Sharma, W. Wu, E. N. Dalal — “The CIEDE2000 Color-Difference Formula,” Color Research & Application, 30(1), 21–30, 2005.
Perceptual Color Spaces
[6] IEC — IEC 61966-2-1:1999 — sRGB standard RGB colour space.
Color Appearance & CVD Simulation
[8] H. Brettel, F. Viénot, J. D. Mollon — “Computerized simulation of color appearance for dichromats,” JOSA A, 14(10), 2647–2655, 1997.
[9] F. Viénot, H. Brettel, J. D. Mollon — “Digital video colourmaps for checking the legibility of displays by dichromats,” Color Research & Application, 24(4), 243–252, 1999.
[10] G. M. Machado, M. M. Oliveira, L. A. F. Fernandes — “A Physiologically-based Model for Simulation of Color Vision Deficiency,” IEEE TVCG, 15(6), 1291–1298, 2009.
Print & Reproduction
[12] R. W. G. Hunt — The Reproduction of Colour, 6th ed., Wiley, 2004.
About this tool
This tool implements Kubelka-Munk reflectance mixing, RGB additive, CIELab-weighted, and OKLab-perceptual formulation with CIEDE2000 precision scoring, CVD simulation (Brettel/Viénot/Machado for 8 vision types), OKLCh harmony engine, perceptual ladders, CIE xy chromaticity, OKLab gamut slice, 32-pigment database, gradient-descent optimizer, and batch analysis — entirely client-side (zero network). Not a substitute for spectrophotometric measurement or ICC profile software.
Iterative gradient descent adjusts colorant concentrations to minimize ΔE₀₀ to the target color. Uses the Lab tab’s colorant list and mixing mode.
Finds the nearest matches from a built-in database of 32 artist pigments, ranked by ΔE₀₀.
12 test colours with CIE L*a*b*, OKLCh, and CMYK values for cross-reference.
| HEX | L* | a* | b* | OKL | OKC | OKh° | C | M | Y | K |
|---|
Enter one HEX per line. Returns L*C*h°, OKLab, CMYK, nearest pigment, and ΔE₀₀.