Color difference scores help compare two color values, deduplicate extracted palettes, and evaluate whether simulated or processed colors remain distinct. They are not accessibility scores.
Hue Codex calculates Delta E 76 as Euclidean distance in CIE Lab and OKLab distance as Euclidean distance in OKLab scaled for readability. These scores are useful signals, not universal human perception guarantees.
Delta E 76 is simple, symmetric, and easy to explain, but less perceptually uniform than newer tolerance formulas.
OKLab distance is reported as a modern perceptual-style companion signal.
Contrast ratio and color difference answer different questions and should not be substituted for each other.
Image extraction and color-vision simulation use Delta E style distance for closeness and risk ranking.
Standards status
These badges identify which parts of this methodology are standards-backed, draft-track, Hue Codex-specific, approximate, or dependent on browser behavior.
StandardHue Codex heuristicApproximation
StandardStable standard or standards-backed behavior used as authority, such as WCAG 2.2 and broadly implemented CSS Color 4 behavior.
Hue Codex heuristicHue Codex ranking, role hints, bands, labels, or workflow guidance rather than an external standard.
ApproximationModel or estimate with known limits, including CMYK, color-vision simulation, image palette extraction, or CSS duotone output.
Formulas, choices, heuristics, and limits
This separates standards-based formulas from Hue Codex implementation decisions, product heuristics, and known limitations for this methodology.
Standards-based formulas
Formula, threshold, syntax, or data behavior taken from a cited standard or standards-backed source.
Delta E 76 is calculated as Euclidean distance in CIE Lab.
CSS Color 4 Lab, OKLab, XYZ, and conversion context support the coordinate calculations.
Implementation choices
How Hue Codex chooses to parse, normalize, round, export, or sequence calculations.
Hue Codex normalizes both colors to sRGB HEX before converting and comparing them.
OKLab distance is scaled for readability so it can sit beside Delta E style bands.
Comparison results are reported separately from contrast because they answer different questions.
Hue Codex heuristics
Product rankings, bands, labels, suggestions, or role hints that are useful guidance but not external standards.
Color-difference interpretation bands are Hue Codex labels, not universal pass/fail standards.
Near-duplicate filtering and extracted-palette diversity ranking use distance as a product heuristic.
Known limitations
Caveats, edge cases, browser dependencies, approximations, or contexts the method does not prove.
Delta E 76 is simple and explainable but not uniformly perceptual in every color region.
A high color-difference score does not mean text is readable.
Viewing conditions, display calibration, materials, and adaptation can change perceived difference.
Inputs and conversion
Standard
Hue Codex normalizes both colors to sRGB HEX, converts them to Lab and OKLab, then compares component differences. The same conversion engine used by color conversion tools is used here.
The comparison is symmetric: color A compared to color B produces the same distance as color B compared to color A.
Delta E 76 and OKLab distance
StandardApproximation
Delta E 76 is the Euclidean distance between Lab coordinates: the square root of the sum of squared differences in L, a, and b.
OKLab distance uses the same Euclidean idea on OKLab components and scales the result by 100 to make values easier to read next to Delta E bands.
Interpretation bands
Hue Codex heuristic
Hue Codex color-difference bands.
Delta E 76 range
Label
0 to 1
Practically identical
Greater than 1 to 2.3
Tiny visible shift
Greater than 2.3 to 10
Close visible variant
Greater than 10 to 20
Clearly different
Greater than 20 to 35
Distinct palette color
Greater than 35
Strongly separated
Limits
ApproximationBrowser-dependent
Delta E 76 does not model every perceptual condition equally well.
A high color-difference score does not mean text is readable.
A low score can still matter if the colors have different semantic roles or are used in small UI details.
Display calibration, viewing conditions, materials, and adaptation can change perceived difference.
Validation checks
Hue Codex heuristic
Color-difference QA checks.
Check
Expected behavior
Same HEX compared with itself
Zero distance
A compared with B and B compared with A
Same distance
Near duplicate extracted swatches
Ranked as close before more distinct palette colors
Contrast compared with Delta E
Reported separately because they measure different things
Color-difference equations
StandardApproximationHue Codex heuristic
The formulas are standards-based or standards-derived color-space math. The interpretation bands remain Hue Codex heuristics.
Large color difference does not imply passing text contrast
Sources and standards
These references anchor the public standards and formats used by Hue Codex. Status badges distinguish stable standards, drafts, Hue Codex heuristics, approximations, and browser-dependent behavior.