Skip to content

Commit

Permalink
fix(ansi): lightness values
Browse files Browse the repository at this point in the history
This adjusts the lightness values for the ANSI generation to result in the expected HEX values.
  • Loading branch information
unseen-ninja committed Oct 21, 2024
1 parent eed6c2a commit ff92bfd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
50 changes: 25 additions & 25 deletions palette.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
"code": 1
},
"bright": {
"hex": "#d71f39",
"hex": "#de293e",
"code": 9
}
},
Expand All @@ -450,7 +450,7 @@
"code": 2
},
"bright": {
"hex": "#40a735",
"hex": "#49af3d",
"code": 10
}
},
Expand All @@ -460,7 +460,7 @@
"code": 3
},
"bright": {
"hex": "#e49722",
"hex": "#eea02d",
"code": 11
}
},
Expand All @@ -470,7 +470,7 @@
"code": 4
},
"bright": {
"hex": "#3c68f9",
"hex": "#456eff",
"code": 12
}
},
Expand All @@ -480,7 +480,7 @@
"code": 5
},
"bright": {
"hex": "#f47ccf",
"hex": "#fe85d8",
"code": 13
}
},
Expand All @@ -490,7 +490,7 @@
"code": 6
},
"bright": {
"hex": "#2298a1",
"hex": "#2d9fa8",
"code": 14
}
},
Expand Down Expand Up @@ -946,7 +946,7 @@
"code": 1
},
"bright": {
"hex": "#ea7475",
"hex": "#e67172",
"code": 9
}
},
Expand All @@ -956,7 +956,7 @@
"code": 2
},
"bright": {
"hex": "#93cb76",
"hex": "#8ec772",
"code": 10
}
},
Expand All @@ -966,7 +966,7 @@
"code": 3
},
"bright": {
"hex": "#debf78",
"hex": "#d9ba73",
"code": 11
}
},
Expand All @@ -976,7 +976,7 @@
"code": 4
},
"bright": {
"hex": "#7fa2f4",
"hex": "#7b9ef0",
"code": 12
}
},
Expand All @@ -986,7 +986,7 @@
"code": 5
},
"bright": {
"hex": "#f6a9df",
"hex": "#f2a4db",
"code": 13
}
},
Expand All @@ -996,7 +996,7 @@
"code": 6
},
"bright": {
"hex": "#5ec3b9",
"hex": "#5abfb5",
"code": 14
}
},
Expand Down Expand Up @@ -1452,7 +1452,7 @@
"code": 1
},
"bright": {
"hex": "#f07889",
"hex": "#ec7486",
"code": 9
}
},
Expand All @@ -1462,7 +1462,7 @@
"code": 2
},
"bright": {
"hex": "#90d483",
"hex": "#8ccf7f",
"code": 10
}
},
Expand All @@ -1472,7 +1472,7 @@
"code": 3
},
"bright": {
"hex": "#e6ca86",
"hex": "#e1c682",
"code": 11
}
},
Expand All @@ -1482,7 +1482,7 @@
"code": 4
},
"bright": {
"hex": "#7ca5fa",
"hex": "#78a1f6",
"code": 12
}
},
Expand All @@ -1492,7 +1492,7 @@
"code": 5
},
"bright": {
"hex": "#f7aee1",
"hex": "#f2a9dd",
"code": 13
}
},
Expand All @@ -1502,7 +1502,7 @@
"code": 6
},
"bright": {
"hex": "#68d0c4",
"hex": "#63cbc0",
"code": 14
}
},
Expand Down Expand Up @@ -1958,7 +1958,7 @@
"code": 1
},
"bright": {
"hex": "#f77b9d",
"hex": "#f37799",
"code": 9
}
},
Expand All @@ -1968,7 +1968,7 @@
"code": 2
},
"bright": {
"hex": "#8edd90",
"hex": "#89d88b",
"code": 10
}
},
Expand All @@ -1978,7 +1978,7 @@
"code": 3
},
"bright": {
"hex": "#f1d895",
"hex": "#ebd391",
"code": 11
}
},
Expand All @@ -1988,7 +1988,7 @@
"code": 4
},
"bright": {
"hex": "#78acff",
"hex": "#74a8fc",
"code": 12
}
},
Expand All @@ -1998,7 +1998,7 @@
"code": 5
},
"bright": {
"hex": "#f7b3e2",
"hex": "#f2aede",
"code": 13
}
},
Expand All @@ -2008,7 +2008,7 @@
"code": 6
},
"bright": {
"hex": "#70dcce",
"hex": "#6bd7ca",
"code": 14
}
},
Expand All @@ -2024,4 +2024,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion scripts/gen_palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ const formatted = entriesFromObject(definitions).reduce(
brightColorHex = flavor.colors["subtext0"];
} else {
const brightColor = new Color(normalColorHex);
brightColor.lch.l *= flavor.dark ? 0.96 : 1.04;
brightColor.lch.l *= flavor.dark ? 0.94 : 1.09;
brightColor.lch.c += flavor.dark ? 8 : 0;
brightColor.lch.h += 2;
brightColorHex = brightColor.toString({ format: "hex" });
Expand Down

0 comments on commit ff92bfd

Please sign in to comment.