fix hex output

This commit is contained in:
41666 2024-05-02 21:10:44 -04:00
parent 39a6eac196
commit 8013113c98

View file

@ -66,7 +66,7 @@
colorBoxEl.setAttribute("style", `--color: rgb(${r}, ${g}, ${b})`);
hexEl.innerHTML = `#${(
r.toString(16).padStart(2, "0") +
b.toString(16).padStart(2, "0") +
g.toString(16).padStart(2, "0") +
b.toString(16).padStart(2, "0")
).toLowerCase()}`;
rgbEl.innerHTML = `rgb(${r}, ${g}, ${b})`;