From 18ae8418d5af607c8423edf32c1e3f4d8064d086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 12 Mar 2024 16:13:58 +0100 Subject: [PATCH] =?UTF-8?q?Update=20=CE=94EOK=20to=20be=20more=20perceptua?= =?UTF-8?q?lly=20uniform?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css-color-4/deltaEOK.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/css-color-4/deltaEOK.js b/css-color-4/deltaEOK.js index d83641d3b94..cec4ee538a8 100644 --- a/css-color-4/deltaEOK.js +++ b/css-color-4/deltaEOK.js @@ -9,7 +9,7 @@ function deltaEOK (reference, sample) { let [L1, a1, b1] = reference; let [L2, a2, b2] = sample; let ΔL = L1 - L2; - let Δa = a1 - a2; - let Δb = b1 - b2; + let Δa = 2 * (a1 - a2); + let Δb = 2 * (b1 - b2); return Math.sqrt(ΔL ** 2 + Δa ** 2 + Δb ** 2); -} \ No newline at end of file +}