Which distance metric picks the best nearest-neighbour in a 16-colour DVD palette? 12 metrics tested across 20 diagnostic colours and 262,144 exhaustive inputs.
DVD default 16-colour global palette. Each subtitle must select 4 colours from this fixed set.
For each test colour, 12 distance metrics pick the nearest palette entry. "Claude's opinion" is what Claude Opus 4.6 judged as the perceptually best match.
How often does each metric agree with Claude's opinion?
| Metric | Formula (OkLab unless noted) | Notes |
|---|---|---|
| sRGB | ΔR² + ΔG² + ΔB² | What dvdsubenc.c uses |
| OkLab | ΔL² + Δa² + Δb² | Current FFmpeg quantizer |
| HyAB w=N | |ΔL| + N·√(Δa²+Δb²) | Abasi et al. 2020 |
| OkLab C×N | ΔL² + N·(Δa²+Δb²) | Chroma-weighted Euclidean |
| OkLab L×N | N·ΔL² + Δa² + Δb² | Lightness-reduced (= C×1/N) |
| CIEDE2000 | CIE standard with SL/SC/SH/RT | In CIELAB, not OkLab |
No perceptual metric beats sRGB for this sparse palette. All OkLab variants map chromatic colours to achromatic entries (light-grey) too readily. sRGB's equal-weight RGB channels act as implicit hue preservation. Even CIEDE2000 (the CIE gold standard) maps skin tone to grey.