Skip to content

Commit

Permalink
chore: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoudham committed Oct 23, 2024
1 parent 77e6fe0 commit 7d9751c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/gen_palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,12 @@ const formatted = entriesFromObject(definitions).reduce(
const mapping = props.normal.mapping as ColorName;
let normalColorHex = flavor.colors[mapping];
let brightColorHex: string;

// Color 0 (Black)
if (props.normal.mapping == "surface2") {
normalColorHex = flavor.dark ? flavor.colors["surface2"] : flavor.colors["subtext1"];
brightColorHex = flavor.dark ? flavor.colors["surface1"] : flavor.colors["subtext0"];
// Color 8 (White)
} else if (props.normal.mapping == "subtext1") {
normalColorHex = flavor.dark ? flavor.colors["subtext1"] : flavor.colors["surface2"] ;
brightColorHex = flavor.dark ? flavor.colors["subtext0"] : flavor.colors["surface1"] ;
Expand Down

0 comments on commit 7d9751c

Please sign in to comment.