Skip to content

Commit 4d23b83

Browse files
authored
Merge pull request #357 from primer/color-contrast
Improve color contrast for default Light + Dark themes
2 parents 83fe7bc + 30e8ab6 commit 4d23b83

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.changeset/modern-cougars-stare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"github-vscode-theme": patch
3+
---
4+
5+
Improve color contrast for default Light and Dark themes

src/colors.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,30 @@ function getColors(theme) {
1010

1111
switch(theme) {
1212
case "light":
13+
14+
// Temp override until Primitives are updated
15+
lightColors.success.emphasis = "#1f883d";
16+
lightColors.btn.primary.bg = lightColors.success.emphasis;
17+
lightColors.btn.primary.hoverBg = lightColors.scale.green[5];
18+
lightColors.fg.default = "#1f2328";
19+
lightColors.fg.muted = "#656d76";
20+
1321
return lightColors;
1422
case "light_high_contrast":
1523
return lightHighContrastColors;
1624
case "light_colorblind":
1725
return lightColorblindColors;
1826
case "dark":
27+
28+
// Temp override until Primitives are updated
29+
darkColors.fg.default = "#e6edf3";
30+
darkColors.fg.muted = "#7d8590";
31+
darkColors.accent.fg = "#2f81f7";
32+
darkColors.severe.subtle = "rgba(219, 109, 40, 0.1)";
33+
darkColors.danger.subtle = "rgba(248, 81, 73, 0.1)";
34+
darkColors.done.subtle = "rgba(163, 113, 247, 0.1)";
35+
darkColors.sponsors.subtle = "rgba(219, 97, 162, 0.1)";
36+
1937
return darkColors;
2038
case "dark_high_contrast":
2139
return darkHighContrastColors;

0 commit comments

Comments
 (0)