Skip to content

Commit

Permalink
refactor: inline
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoudham committed Oct 21, 2024
1 parent f1f3989 commit 55faf86
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/gen_palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,9 @@ const formatted = entriesFromObject(definitions).reduce(
brightColorHex = flavor.colors["subtext0"]
} else {
const brightColor = new Color(normalColorHex);
const lightnessShift = flavor.dark ? 0.96 : 1.04;
const chromaShift = flavor.dark ? 8 : 0;
const hueShift = 2;
brightColor.lch.l *= lightnessShift;
brightColor.lch.c += chromaShift;
brightColor.lch.h += hueShift;
brightColor.lch.l *= flavor.dark ? 0.96 : 1.04;
brightColor.lch.c += flavor.dark ? 8 : 0;
brightColor.lch.h += 2;
brightColorHex = brightColor.toString({ format: "hex" })
}
acc[name] = {
Expand Down

0 comments on commit 55faf86

Please sign in to comment.