This commit is contained in:
Maciej Caderek
2022-02-17 04:11:36 +01:00
parent 10cea708f0
commit 031d9f7495
6 changed files with 54 additions and 11 deletions

View File

@@ -63,7 +63,9 @@ const changeHSL = (
const [r, g, b] = chunk(
colorHex.length === 4 ? 1 : 2,
colorHex.slice(1).split("")
).map((x) => parseInt(x.join(""), 16));
).map((x) => {
return parseInt(x.join(""), 16);
});
let [h, s, l] = rgb2hsl(r, g, b);
const absDelta = Math.abs(deltaH);