Skip to content

Instantly share code, notes, and snippets.

@svgeesus
Last active June 30, 2022 12:59
Show Gist options
  • Save svgeesus/666a65cbee65f811ce1aa6e6e739705b to your computer and use it in GitHub Desktop.
Save svgeesus/666a65cbee65f811ce1aa6e6e739705b to your computer and use it in GitHub Desktop.

Debugging HSL funky values from index.js

let color_red = new Color("hsl(0 80% 50%)");
let color_red_light = color_red.clone().set({"lch.l":80});
let crl_lch = color_red.to("lch");
crl_lch.l = 80;
crl_lch;
crl_lch.to("srgb");
let crl_ingamut = crl_lch.to("srgb").toGamut("srgb");
crl_lch.to("hsl").coords;
crl_lch.to("hsl");
crl_ingamut.to("hsl");
crl_ingamut.to("hsl").coords;
let color_red_lighter = color_red.clone().set({"lch.l": 94});
let crll_lch = color_red.to("lch");
crll_lch.l = 94;
crll_lch;
crll_lch.to("srgb");
crll_lch.to("hsl").coords;
crll_lch.to("hsl");
crll_lch.to("srgb").to("hsl");
let crll_ingamut = crll_lch.to("srgb").toGamut("srgb");
crll_ingamut.to("hsl");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment