Skip to content

Commit 18ae841

Browse files
authored
Update ΔEOK to be more perceptually uniform
1 parent 2bccebb commit 18ae841

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

css-color-4/deltaEOK.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function deltaEOK (reference, sample) {
99
let [L1, a1, b1] = reference;
1010
let [L2, a2, b2] = sample;
1111
let ΔL = L1 - L2;
12-
let Δa = a1 - a2;
13-
let Δb = b1 - b2;
12+
let Δa = 2 * (a1 - a2);
13+
let Δb = 2 * (b1 - b2);
1414
return Math.sqrt(ΔL ** 2 + Δa ** 2 + Δb ** 2);
15-
}
15+
}

0 commit comments

Comments
 (0)