Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle muted foreground color combined with default control background in dark mode #782

Merged
merged 8 commits into from
Nov 22, 2023

Conversation

langermank
Copy link
Contributor

Summary

In the default light theme, the muted or subtle canvas background color matches button (default control). In default dark, it's off by one step on the scale. We can either adjust that background color, or bring the fgColor-muted up a little bit.

Option 1: adjust default control background color

before after
button before button after

Option 2: adjust muted foreground color

before after
button before button after

I'm leaning towards option 2 because it seems like the background color in dark mode was intentional (perhaps to add more contrast). If we had stronger border colors for controls, I wouldn't mind changing that background color.

@langermank langermank requested a review from a team as a code owner November 21, 2023 23:50
Copy link

changeset-bot bot commented Nov 21, 2023

🦋 Changeset detected

Latest commit: fe51fbb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/primitives Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 21, 2023

Variables changed
--- base/dist/scss/colors/_dark.scss	2023-11-22 19:30:01.996817122 +0000
+++ dist/scss/colors/_dark.scss	2023-11-22 19:29:48.856774804 +0000
@@ -17,3 +17,3 @@
     --color-diff-blob-hunk-num-bg: rgba(56,139,253,0.4);
-    --color-diff-blob-expander-icon: #7d8590;
+    --color-diff-blob-expander-icon: #848d97;
     --color-diff-blob-selected-line-highlight-mix-blend-mode: screen;
@@ -58,3 +58,3 @@
     --color-codemirror-guttermarker-subtle-text: #6e7681;
-    --color-codemirror-linenumber-text: #7d8590;
+    --color-codemirror-linenumber-text: #848d97;
     --color-codemirror-cursor: #e6edf3;
@@ -76,8 +76,8 @@
     --color-checks-text-primary: #e6edf3;
-    --color-checks-text-secondary: #7d8590;
+    --color-checks-text-secondary: #848d97;
     --color-checks-text-link: #2f81f7;
-    --color-checks-btn-icon: #7d8590;
+    --color-checks-btn-icon: #848d97;
     --color-checks-btn-hover-icon: #e6edf3;
     --color-checks-btn-hover-bg: rgba(110,118,129,0.1);
-    --color-checks-input-text: #7d8590;
+    --color-checks-input-text: #848d97;
     --color-checks-input-placeholder-text: #6e7681;
@@ -99,7 +99,7 @@
     --color-checks-scrollbar-thumb-bg: rgba(110,118,129,0.4);
-    --color-checks-header-label-text: #7d8590;
+    --color-checks-header-label-text: #848d97;
     --color-checks-header-label-open-text: #e6edf3;
     --color-checks-header-border: #21262d;
-    --color-checks-header-icon: #7d8590;
-    --color-checks-line-text: #7d8590;
+    --color-checks-header-icon: #848d97;
+    --color-checks-line-text: #848d97;
     --color-checks-line-num-text: #6e7681;
@@ -112,3 +112,3 @@
     --color-checks-gate-bg: rgba(187,128,9,0.15);
-    --color-checks-gate-text: #7d8590;
+    --color-checks-gate-text: #848d97;
     --color-checks-gate-waiting-text: #d29922;
@@ -117,9 +117,9 @@
     --color-checks-step-warning-text: #d29922;
-    --color-checks-logline-text: #7d8590;
+    --color-checks-logline-text: #848d97;
     --color-checks-logline-num-text: #6e7681;
     --color-checks-logline-debug-text: #a371f7;
-    --color-checks-logline-error-text: #7d8590;
+    --color-checks-logline-error-text: #848d97;
     --color-checks-logline-error-num-text: #6e7681;
     --color-checks-logline-error-bg: rgba(248,81,73,0.1);
-    --color-checks-logline-warning-text: #7d8590;
+    --color-checks-logline-warning-text: #848d97;
     --color-checks-logline-warning-num-text: #d29922;
@@ -274,3 +274,3 @@
     --color-switch-track-disabled-bg: #21262d;
-    --color-switch-track-fg: #7d8590;
+    --color-switch-track-fg: #848d97;
     --color-switch-track-disabled-fg: #010409;
@@ -295,5 +295,5 @@
     --color-tree-view-item-chevron-hover-bg: rgba(177,186,196,0.12);
-    --color-tree-view-item-directory-fill: #7d8590;
+    --color-tree-view-item-directory-fill: #848d97;
     --color-fg-default: #e6edf3;
-    --color-fg-muted: #7d8590;
+    --color-fg-muted: #848d97;
     --color-fg-subtle: #6e7681;

@langermank langermank changed the title Update default control background color to match dark muted value Handle muted foreground color combined with default control background in dark mode Nov 21, 2023
Copy link
Contributor

github-actions bot commented Nov 21, 2023

Design Token Contrast Check

light: ✅ all checks passed

Show results table for theme: light
contrastPair pass contrastRatio minimumContrastRatio
fg.default vs. canvas.default 15.79:1 4.5:1
fg.muted vs. canvas.default 5.24:1 4.5:1
fg.subtle vs. canvas.default 4.54:1 4.5:1
fg.default vs. canvas.subtle 14.83:1 4.5:1
fg.muted vs. canvas.subtle 4.92:1 4.5:1
fg.default vs. canvas.inset 14.83:1 4.5:1
fg.muted vs. canvas.inset 4.92:1 4.5:1
fg.default vs. accent.fg 3.04:1 3:1
fg.default vs. fg.muted 3.01:1 3:1
fg.default vs. accent.subtle 13.88:1 4.5:1
fg.default vs. success.subtle 14.19:1 4.5:1
fg.default vs. open.subtle 14.19:1 4.5:1
fg.default vs. danger.subtle 13.77:1 4.5:1
fg.default vs. closed.subtle 13.77:1 4.5:1
fg.default vs. attention.subtle 14.65:1 4.5:1
fg.default vs. severe.subtle 14.26:1 4.5:1
fg.default vs. done.subtle 14.21:1 4.5:1
fg.default vs. sponsors.subtle 14.24:1 4.5:1
accent.fg vs. canvas.default 5.19:1 4.5:1
accent.fg vs. canvas.subtle 4.87:1 4.5:1
accent.fg vs. canvas.inset 4.87:1 4.5:1
success.fg vs. canvas.default 5.07:1 4.5:1
success.fg vs. canvas.subtle 4.77:1 4.5:1
success.fg vs. canvas.inset 4.77:1 4.5:1
open.fg vs. canvas.default 5.07:1 4.5:1
open.fg vs. canvas.subtle 4.77:1 4.5:1
open.fg vs. canvas.inset 4.77:1 4.5:1
danger.fg vs. canvas.default 5.24:1 4.5:1
danger.fg vs. canvas.subtle 4.92:1 4.5:1
danger.fg vs. canvas.inset 4.92:1 4.5:1
closed.fg vs. canvas.default 5.24:1 4.5:1
closed.fg vs. canvas.subtle 4.92:1 4.5:1
closed.fg vs. canvas.inset 4.92:1 4.5:1
attention.fg vs. canvas.default 4.86:1 4.5:1
attention.fg vs. canvas.subtle 4.57:1 4.5:1
attention.fg vs. canvas.inset 4.57:1 4.5:1
severe.fg vs. canvas.default 5.03:1 4.5:1
severe.fg vs. canvas.subtle 4.72:1 4.5:1
severe.fg vs. canvas.inset 4.72:1 4.5:1
done.fg vs. canvas.default 5.04:1 4.5:1
done.fg vs. canvas.subtle 4.73:1 4.5:1
done.fg vs. canvas.inset 4.73:1 4.5:1
sponsors.fg vs. canvas.default 5.04:1 4.5:1
sponsors.fg vs. canvas.subtle 4.73:1 4.5:1
sponsors.fg vs. canvas.inset 4.73:1 4.5:1
accent.fg vs. accent.subtle 4.56:1 4.5:1
success.fg vs. success.subtle 4.56:1 4.5:1
open.fg vs. open.subtle 4.56:1 4.5:1
danger.fg vs. danger.subtle 4.57:1 4.5:1
closed.fg vs. closed.subtle 4.57:1 4.5:1
attention.fg vs. attention.subtle 4.51:1 4.5:1
severe.fg vs. severe.subtle 4.54:1 4.5:1
done.fg vs. done.subtle 4.53:1 4.5:1
sponsors.fg vs. sponsors.subtle 4.55:1 4.5:1
accent.fg vs. fg.default 3.04:1 3:1
success.fg vs. fg.default 3.11:1 3:1
open.fg vs. fg.default 3.11:1 3:1
danger.fg vs. fg.default 3.01:1 3:1
closed.fg vs. fg.default 3.01:1 3:1
attention.fg vs. fg.default 3.24:1 3:1
severe.fg vs. fg.default 3.13:1 3:1
done.fg vs. fg.default 3.13:1 3:1
sponsors.fg vs. fg.default 3.13:1 3:1
fg.onEmphasis vs. neutral.emphasis 4.54:1 4.5:1
fg.onEmphasis vs. neutral.emphasisPlus 14.65:1 4.5:1
fg.onEmphasis vs. accent.emphasis 5.19:1 4.5:1
fg.onEmphasis vs. success.emphasis 4.51:1 4.5:1
fg.onEmphasis vs. open.emphasis 4.51:1 4.5:1
fg.onEmphasis vs. danger.emphasis 5.35:1 4.5:1
fg.onEmphasis vs. closed.emphasis 5.35:1 4.5:1
fg.onEmphasis vs. attention.emphasis 4.86:1 4.5:1
fg.onEmphasis vs. severe.emphasis 5.03:1 4.5:1
fg.onEmphasis vs. done.emphasis 5.04:1 4.5:1
fg.onEmphasis vs. sponsors.emphasis 5.04:1 4.5:1
control.borderColor.emphasis vs. canvas.default 3.28:1 3:1
control.borderColor.emphasis vs. canvas.subtle 3.08:1 3:1

dark: ❌ 10 checks failed

Show results table for theme: dark
contrastPair pass contrastRatio minimumContrastRatio
fg.default vs. canvas.default 16.01:1 4.5:1
fg.muted vs. canvas.default 5.62:1 4.5:1
fg.subtle vs. canvas.default 4.11:1 4.5:1
fg.default vs. canvas.subtle 14.63:1 4.5:1
fg.muted vs. canvas.subtle 5.13:1 4.5:1
fg.default vs. canvas.inset 17.37:1 4.5:1
fg.muted vs. canvas.inset 6.1:1 4.5:1
fg.default vs. accent.fg 3.17:1 3:1
fg.default vs. fg.muted 2.84:1 3:1
fg.default vs. accent.subtle on canvas.default 14.34:1 4.5:1
fg.default vs. accent.subtle on canvas.subtle 12.91:1 4.5:1
fg.default vs. success.subtle on canvas.default 13.44:1 4.5:1
fg.default vs. success.subtle on canvas.subtle 12:1 4.5:1
fg.default vs. open.subtle on canvas.default 13.44:1 4.5:1
fg.default vs. open.subtle on canvas.subtle 12:1 4.5:1
fg.default vs. danger.subtle on canvas.default 14.59:1 4.5:1
fg.default vs. danger.subtle on canvas.subtle 13.2:1 4.5:1
fg.default vs. closed.subtle on canvas.default 13.64:1 4.5:1
fg.default vs. closed.subtle on canvas.subtle 12.34:1 4.5:1
fg.default vs. attention.subtle on canvas.default 13.4:1 4.5:1
fg.default vs. attention.subtle on canvas.subtle 12.08:1 4.5:1
fg.default vs. severe.subtle on canvas.default 14.45:1 4.5:1
fg.default vs. severe.subtle on canvas.subtle 13.03:1 4.5:1
fg.default vs. done.subtle on canvas.default 14.28:1 4.5:1
fg.default vs. done.subtle on canvas.subtle 12.85:1 4.5:1
fg.default vs. sponsors.subtle on canvas.default 14.4:1 4.5:1
fg.default vs. sponsors.subtle on canvas.subtle 12.98:1 4.5:1
accent.fg vs. canvas.default 5.05:1 4.5:1
accent.fg vs. canvas.subtle 4.61:1 4.5:1
accent.fg vs. canvas.inset 5.48:1 4.5:1
success.fg vs. canvas.default 7.44:1 4.5:1
success.fg vs. canvas.subtle 6.8:1 4.5:1
success.fg vs. canvas.inset 8.08:1 4.5:1
open.fg vs. canvas.default 7.44:1 4.5:1
open.fg vs. canvas.subtle 6.8:1 4.5:1
open.fg vs. canvas.inset 8.08:1 4.5:1
danger.fg vs. canvas.default 5.64:1 4.5:1
danger.fg vs. canvas.subtle 5.16:1 4.5:1
danger.fg vs. canvas.inset 6.12:1 4.5:1
closed.fg vs. canvas.default 5.64:1 4.5:1
closed.fg vs. canvas.subtle 5.16:1 4.5:1
closed.fg vs. canvas.inset 6.12:1 4.5:1
attention.fg vs. canvas.default 7.49:1 4.5:1
attention.fg vs. canvas.subtle 6.85:1 4.5:1
attention.fg vs. canvas.inset 8.13:1 4.5:1
severe.fg vs. canvas.default 5.61:1 4.5:1
severe.fg vs. canvas.subtle 5.13:1 4.5:1
severe.fg vs. canvas.inset 6.09:1 4.5:1
done.fg vs. canvas.default 5.64:1 4.5:1
done.fg vs. canvas.subtle 5.15:1 4.5:1
done.fg vs. canvas.inset 6.12:1 4.5:1
sponsors.fg vs. canvas.default 5.62:1 4.5:1
sponsors.fg vs. canvas.subtle 5.14:1 4.5:1
sponsors.fg vs. canvas.inset 6.1:1 4.5:1
accent.fg vs. accent.subtle on canvas.default 4.52:1 4.5:1
success.fg vs. success.subtle on canvas.default 6.25:1 4.5:1
success.fg vs. success.subtle on canvas.subtle 5.58:1 4.5:1
open.fg vs. open.subtle on canvas.default 6.25:1 4.5:1
open.fg vs. open.subtle on canvas.subtle 5.58:1 4.5:1
danger.fg vs. danger.subtle on canvas.default 5.14:1 4.5:1
danger.fg vs. danger.subtle on canvas.subtle 4.65:1 4.5:1
closed.fg vs. closed.subtle on canvas.default 4.81:1 4.5:1
attention.fg vs. attention.subtle on canvas.default 6.27:1 4.5:1
attention.fg vs. attention.subtle on canvas.subtle 5.65:1 4.5:1
severe.fg vs. severe.subtle on canvas.default 5.06:1 4.5:1
severe.fg vs. severe.subtle on canvas.subtle 4.57:1 4.5:1
done.fg vs. done.subtle on canvas.default 5.03:1 4.5:1
done.fg vs. done.subtle on canvas.subtle 4.52:1 4.5:1
sponsors.fg vs. sponsors.subtle on canvas.default 5.06:1 4.5:1
sponsors.fg vs. sponsors.subtle on canvas.subtle 4.56:1 4.5:1
accent.fg vs. fg.default 3.17:1 3:1
success.fg vs. fg.default 2.14:1 3:1
open.fg vs. fg.default 2.14:1 3:1
danger.fg vs. fg.default 2.83:1 3:1
closed.fg vs. fg.default 2.83:1 3:1
attention.fg vs. fg.default 2.13:1 3:1
severe.fg vs. fg.default 2.85:1 3:1
done.fg vs. fg.default 2.83:1 3:1
sponsors.fg vs. fg.default 2.84:1 3:1
fg.onEmphasis vs. neutral.emphasis 4.59:1 4.5:1
fg.onEmphasis vs. neutral.emphasisPlus 4.59:1 4.5:1
fg.onEmphasis vs. accent.emphasis 4.63:1 4.5:1
fg.onEmphasis vs. success.emphasis 4.63:1 4.5:1
fg.onEmphasis vs. open.emphasis 4.63:1 4.5:1
fg.onEmphasis vs. danger.emphasis 4.6:1 4.5:1
fg.onEmphasis vs. closed.emphasis 4.6:1 4.5:1
fg.onEmphasis vs. attention.emphasis 4.64:1 4.5:1
fg.onEmphasis vs. severe.emphasis 4.65:1 4.5:1
fg.onEmphasis vs. done.emphasis 4.6:1 4.5:1
fg.onEmphasis vs. sponsors.emphasis 4.57:1 4.5:1
control.borderColor.emphasis vs. canvas.default 3.31:1 3:1
control.borderColor.emphasis vs. canvas.subtle 3.02:1 3:1

Copy link
Contributor

github-actions bot commented Nov 21, 2023

Design Token Diff

/css/functional/themes/dark-colorblind.css

+++ /home/runner/work/primitives/primitives/tokens-next-private/css/functional/themes/dark-colorblind.css	2023-11-22 19:29:48.485015570 +0000
@@ -14,13 +14,13 @@
 --diffBlob-deletion-bgColor-line: #db6d2826;
 --diffBlob-deletion-bgColor-word: #db6d2866;
 --diffBlob-hunk-bgColor-num: #388bfd66;
-  --diffBlob-expander-iconColor: #7d8590;
+  --diffBlob-expander-iconColor: #848d97;
 --codeMirror-fgColor: #e6edf3;
 --codeMirror-bgColor: #0d1117;
 --codeMirror-gutters-bgColor: #0d1117;
 --codeMirror-gutterMarker-fgColor-default: #0d1117;
-  --codeMirror-gutterMarker-fgColor-muted: #7d8590;
-  --codeMirror-lineNumber-fgColor: #7d8590;
+  --codeMirror-gutterMarker-fgColor-muted: #848d97;
+  --codeMirror-lineNumber-fgColor: #848d97;
 --codeMirror-cursor-fgColor: #e6edf3;
 --codeMirror-selection-bgColor: #388bfd66;
 --codeMirror-activeline-bgColor: #6e768166;
@@ -60,7 +60,7 @@
 --control-borderColor-success: #1f6feb;
 --control-borderColor-danger: #bd561d;
 --control-borderColor-warning: #9e6a03;
-  --control-iconColor-rest: #7d8590;
+  --control-iconColor-rest: #848d97;
 --control-transparent-bgColor-rest: #00000000;
 --control-transparent-bgColor-hover: #b1bac41f;
 --control-transparent-bgColor-active: #b1bac433;
@@ -87,7 +87,7 @@
 --controlTrack-bgColor-hover: #292e36;
 --controlTrack-bgColor-active: #31363e;
 --controlTrack-bgColor-disabled: #8b949e;
-  --controlTrack-fgColor-rest: #7d8590;
+  --controlTrack-fgColor-rest: #848d97;
 --controlTrack-fgColor-disabled: #ffffff;
 --controlTrack-borderColor-rest: #00000000;
 --controlTrack-borderColor-disabled: #8b949e;
@@ -124,7 +124,7 @@
 --button-invisible-fgColor-rest: #2f81f7;
 --button-invisible-fgColor-hover: #58a6ff;
 --button-invisible-fgColor-disabled: #8b949e;
-  --button-invisible-iconColor-rest: #7d8590;
+  --button-invisible-iconColor-rest: #848d97;
 --button-invisible-iconColor-hover: #e6edf3;
 --button-invisible-iconColor-disabled: #8b949e;
 --button-invisible-bgColor-rest: #00000000;
@@ -185,12 +185,12 @@
 --sideNav-bgColor-selected: #21262d;
 --skeletonLoader-bgColor: #161b22;
 --timelineBadge-bgColor: #21262d;
-  --treeViewItem-leadingVisual-iconColor-rest: #7d8590;
+  --treeViewItem-leadingVisual-iconColor-rest: #848d97;
 --underlineNav-borderColor-active: #f78166;
 --underlineNav-borderColor-hover: #6e768166;
-  --underlineNav-iconColor-rest: #7d8590;
+  --underlineNav-iconColor-rest: #848d97;
 --fgColor-default: #e6edf3;
-  --fgColor-muted: #7d8590;
+  --fgColor-muted: #848d97;
 --fgColor-onEmphasis: #ffffff;
 --fgColor-onInverse: #0d1117;
 --fgColor-disabled: #8b949e;
@@ -434,13 +434,13 @@
   --diffBlob-deletion-bgColor-line: #db6d2826;
   --diffBlob-deletion-bgColor-word: #db6d2866;
   --diffBlob-hunk-bgColor-num: #388bfd66;
-    --diffBlob-expander-iconColor: #7d8590;
+    --diffBlob-expander-iconColor: #848d97;
   --codeMirror-fgColor: #e6edf3;
   --codeMirror-bgColor: #0d1117;
   --codeMirror-gutters-bgColor: #0d1117;
   --codeMirror-gutterMarker-fgColor-default: #0d1117;
-    --codeMirror-gutterMarker-fgColor-muted: #7d8590;
-    --codeMirror-lineNumber-fgColor: #7d8590;
+    --codeMirror-gutterMarker-fgColor-muted: #848d97;
+    --codeMirror-lineNumber-fgColor: #848d97;
   --codeMirror-cursor-fgColor: #e6edf3;
   --codeMirror-selection-bgColor: #388bfd66;
   --codeMirror-activeline-bgColor: #6e768166;
@@ -480,7 +480,7 @@
   --control-borderColor-success: #1f6feb;
   --control-borderColor-danger: #bd561d;
   --control-borderColor-warning: #9e6a03;
-    --control-iconColor-rest: #7d8590;
+    --control-iconColor-rest: #848d97;
   --control-transparent-bgColor-rest: #00000000;
   --control-transparent-bgColor-hover: #b1bac41f;
   --control-transparent-bgColor-active: #b1bac433;
@@ -507,7 +507,7 @@
   --controlTrack-bgColor-hover: #292e36;
   --controlTrack-bgColor-active: #31363e;
   --controlTrack-bgColor-disabled: #8b949e;
-    --controlTrack-fgColor-rest: #7d8590;
+    --controlTrack-fgColor-rest: #848d97;
   --controlTrack-fgColor-disabled: #ffffff;
   --controlTrack-borderColor-rest: #00000000;
   --controlTrack-borderColor-disabled: #8b949e;
@@ -544,7 +544,7 @@
   --button-invisible-fgColor-rest: #2f81f7;
   --button-invisible-fgColor-hover: #58a6ff;
   --button-invisible-fgColor-disabled: #8b949e;
-    --button-invisible-iconColor-rest: #7d8590;
+    --button-invisible-iconColor-rest: #848d97;
   --button-invisible-iconColor-hover: #e6edf3;
   --button-invisible-iconColor-disabled: #8b949e;
   --button-invisible-bgColor-rest: #00000000;
@@ -605,12 +605,12 @@
   --sideNav-bgColor-selected: #21262d;
   --skeletonLoader-bgColor: #161b22;
   --timelineBadge-bgColor: #21262d;
-    --treeViewItem-leadingVisual-iconColor-rest: #7d8590;
+    --treeViewItem-leadingVisual-iconColor-rest: #848d97;
   --underlineNav-borderColor-active: #f78166;
   --underlineNav-borderColor-hover: #6e768166;
-    --underlineNav-iconColor-rest: #7d8590;
+    --underlineNav-iconColor-rest: #848d97;
   --fgColor-default: #e6edf3;
-    --fgColor-muted: #7d8590;
+    --fgColor-muted: #848d97;
   --fgColor-onEmphasis: #ffffff;
   --fgColor-onInverse: #0d1117;
   --fgColor-disabled: #8b949e;

/css/functional/themes/dark-dimmed.css

+++ /home/runner/work/primitives/primitives/tokens-next-private/css/functional/themes/dark-dimmed.css	2023-11-22 19:29:47.873010494 +0000
@@ -19,8 +19,8 @@
 --codeMirror-bgColor: #22272e;
 --codeMirror-gutters-bgColor: #22272e;
 --codeMirror-gutterMarker-fgColor-default: #22272e;
-  --codeMirror-gutterMarker-fgColor-muted: #6d7986;
-  --codeMirror-lineNumber-fgColor: #6d7986;
+  --codeMirror-gutterMarker-fgColor-muted: #717e8b;
+  --codeMirror-lineNumber-fgColor: #717e8b;
 --codeMirror-cursor-fgColor: #c5d1de;
 --codeMirror-selection-bgColor: #4184e466;
 --codeMirror-activeline-bgColor: #636e7b66;
@@ -60,7 +60,7 @@
 --control-borderColor-success: #347d39;
 --control-borderColor-danger: #c93c37;
 --control-borderColor-warning: #966600;
-  --control-iconColor-rest: #6d7986;
+  --control-iconColor-rest: #717e8b;
 --control-transparent-bgColor-rest: #00000000;
 --control-transparent-bgColor-hover: #909dab1f;
 --control-transparent-bgColor-active: #909dab33;
@@ -87,7 +87,7 @@
 --controlTrack-bgColor-hover: #3d444e;
 --controlTrack-bgColor-active: #434a54;
 --controlTrack-bgColor-disabled: #768390;
-  --controlTrack-fgColor-rest: #6d7986;
+  --controlTrack-fgColor-rest: #717e8b;
 --controlTrack-fgColor-disabled: #cdd9e5;
 --controlTrack-borderColor-rest: #00000000;
 --controlTrack-borderColor-disabled: #768390;
@@ -124,8 +124,8 @@
 --button-invisible-fgColor-rest: #3b7cdb;
 --button-invisible-fgColor-hover: #539bf5;
 --button-invisible-fgColor-disabled: #768390;
-  --button-invisible-iconColor-rest: #6d7986;
-  --button-invisible-iconColor-hover: #6d7986;
+  --button-invisible-iconColor-rest: #717e8b;
+  --button-invisible-iconColor-hover: #717e8b;
 --button-invisible-iconColor-disabled: #768390;
 --button-invisible-bgColor-rest: #00000000;
 --button-invisible-bgColor-hover: #909dab1f;
@@ -185,12 +185,12 @@
 --sideNav-bgColor-selected: #373e47;
 --skeletonLoader-bgColor: #2d333b;
 --timelineBadge-bgColor: #373e47;
-  --treeViewItem-leadingVisual-iconColor-rest: #6d7986;
+  --treeViewItem-leadingVisual-iconColor-rest: #717e8b;
 --underlineNav-borderColor-active: #ec775c;
 --underlineNav-borderColor-hover: #636e7b66;
-  --underlineNav-iconColor-rest: #6d7986;
+  --underlineNav-iconColor-rest: #717e8b;
 --fgColor-default: #c5d1de;
-  --fgColor-muted: #6d7986;
+  --fgColor-muted: #717e8b;
 --fgColor-onEmphasis: #cdd9e5;
 --fgColor-onInverse: #22272e;
 --fgColor-disabled: #768390;
@@ -439,8 +439,8 @@
   --codeMirror-bgColor: #22272e;
   --codeMirror-gutters-bgColor: #22272e;
   --codeMirror-gutterMarker-fgColor-default: #22272e;
-    --codeMirror-gutterMarker-fgColor-muted: #6d7986;
-    --codeMirror-lineNumber-fgColor: #6d7986;
+    --codeMirror-gutterMarker-fgColor-muted: #717e8b;
+    --codeMirror-lineNumber-fgColor: #717e8b;
   --codeMirror-cursor-fgColor: #c5d1de;
   --codeMirror-selection-bgColor: #4184e466;
   --codeMirror-activeline-bgColor: #636e7b66;
@@ -480,7 +480,7 @@
   --control-borderColor-success: #347d39;
   --control-borderColor-danger: #c93c37;
   --control-borderColor-warning: #966600;
-    --control-iconColor-rest: #6d7986;
+    --control-iconColor-rest: #717e8b;
   --control-transparent-bgColor-rest: #00000000;
   --control-transparent-bgColor-hover: #909dab1f;
   --control-transparent-bgColor-active: #909dab33;
@@ -507,7 +507,7 @@
   --controlTrack-bgColor-hover: #3d444e;
   --controlTrack-bgColor-active: #434a54;
   --controlTrack-bgColor-disabled: #768390;
-    --controlTrack-fgColor-rest: #6d7986;
+    --controlTrack-fgColor-rest: #717e8b;
   --controlTrack-fgColor-disabled: #cdd9e5;
   --controlTrack-borderColor-rest: #00000000;
   --controlTrack-borderColor-disabled: #768390;
@@ -544,8 +544,8 @@
   --button-invisible-fgColor-rest: #3b7cdb;
   --button-invisible-fgColor-hover: #539bf5;
   --button-invisible-fgColor-disabled: #768390;
-    --button-invisible-iconColor-rest: #6d7986;
-    --button-invisible-iconColor-hover: #6d7986;
+    --button-invisible-iconColor-rest: #717e8b;
+    --button-invisible-iconColor-hover: #717e8b;
   --button-invisible-iconColor-disabled: #768390;
   --button-invisible-bgColor-rest: #00000000;
   --button-invisible-bgColor-hover: #909dab1f;
@@ -605,12 +605,12 @@
   --sideNav-bgColor-selected: #373e47;
   --skeletonLoader-bgColor: #2d333b;
   --timelineBadge-bgColor: #373e47;
-    --treeViewItem-leadingVisual-iconColor-rest: #6d7986;
+    --treeViewItem-leadingVisual-iconColor-rest: #717e8b;
   --underlineNav-borderColor-active: #ec775c;
   --underlineNav-borderColor-hover: #636e7b66;
-    --underlineNav-iconColor-rest: #6d7986;
+    --underlineNav-iconColor-rest: #717e8b;
   --fgColor-default: #c5d1de;
-    --fgColor-muted: #6d7986;
+    --fgColor-muted: #717e8b;
   --fgColor-onEmphasis: #cdd9e5;
   --fgColor-onInverse: #22272e;
   --fgColor-disabled: #768390;

/css/functional/themes/dark-tritanopia.css

+++ /home/runner/work/primitives/primitives/tokens-next-private/css/functional/themes/dark-tritanopia.css	2023-11-22 19:29:48.181013048 +0000
@@ -14,13 +14,13 @@
 --diffBlob-deletion-bgColor-line: #f8514926;
 --diffBlob-deletion-bgColor-word: #f8514966;
 --diffBlob-hunk-bgColor-num: #388bfd66;
-  --diffBlob-expander-iconColor: #7d8590;
+  --diffBlob-expander-iconColor: #848d97;
 --codeMirror-fgColor: #e6edf3;
 --codeMirror-bgColor: #0d1117;
 --codeMirror-gutters-bgColor: #0d1117;
 --codeMirror-gutterMarker-fgColor-default: #0d1117;
-  --codeMirror-gutterMarker-fgColor-muted: #7d8590;
-  --codeMirror-lineNumber-fgColor: #7d8590;
+  --codeMirror-gutterMarker-fgColor-muted: #848d97;
+  --codeMirror-lineNumber-fgColor: #848d97;
 --codeMirror-cursor-fgColor: #e6edf3;
 --codeMirror-selection-bgColor: #388bfd66;
 --codeMirror-activeline-bgColor: #6e768166;
@@ -60,7 +60,7 @@
 --control-borderColor-success: #1f6feb;
 --control-borderColor-danger: #da3633;
 --control-borderColor-warning: #9e6a03;
-  --control-iconColor-rest: #7d8590;
+  --control-iconColor-rest: #848d97;
 --control-transparent-bgColor-rest: #00000000;
 --control-transparent-bgColor-hover: #b1bac41f;
 --control-transparent-bgColor-active: #b1bac433;
@@ -87,7 +87,7 @@
 --controlTrack-bgColor-hover: #292e36;
 --controlTrack-bgColor-active: #31363e;
 --controlTrack-bgColor-disabled: #8b949e;
-  --controlTrack-fgColor-rest: #7d8590;
+  --controlTrack-fgColor-rest: #848d97;
 --controlTrack-fgColor-disabled: #ffffff;
 --controlTrack-borderColor-rest: #00000000;
 --controlTrack-borderColor-disabled: #8b949e;
@@ -124,7 +124,7 @@
 --button-invisible-fgColor-rest: #2f81f7;
 --button-invisible-fgColor-hover: #58a6ff;
 --button-invisible-fgColor-disabled: #8b949e;
-  --button-invisible-iconColor-rest: #7d8590;
+  --button-invisible-iconColor-rest: #848d97;
 --button-invisible-iconColor-hover: #e6edf3;
 --button-invisible-iconColor-disabled: #8b949e;
 --button-invisible-bgColor-rest: #00000000;
@@ -185,12 +185,12 @@
 --sideNav-bgColor-selected: #21262d;
 --skeletonLoader-bgColor: #161b22;
 --timelineBadge-bgColor: #21262d;
-  --treeViewItem-leadingVisual-iconColor-rest: #7d8590;
+  --treeViewItem-leadingVisual-iconColor-rest: #848d97;
 --underlineNav-borderColor-active: #f78166;
 --underlineNav-borderColor-hover: #6e768166;
-  --underlineNav-iconColor-rest: #7d8590;
+  --underlineNav-iconColor-rest: #848d97;
 --fgColor-default: #e6edf3;
-  --fgColor-muted: #7d8590;
+  --fgColor-muted: #848d97;
 --fgColor-onEmphasis: #ffffff;
 --fgColor-onInverse: #0d1117;
 --fgColor-disabled: #8b949e;
@@ -434,13 +434,13 @@
   --diffBlob-deletion-bgColor-line: #f8514926;
   --diffBlob-deletion-bgColor-word: #f8514966;
   --diffBlob-hunk-bgColor-num: #388bfd66;
-    --diffBlob-expander-iconColor: #7d8590;
+    --diffBlob-expander-iconColor: #848d97;
   --codeMirror-fgColor: #e6edf3;
   --codeMirror-bgColor: #0d1117;
   --codeMirror-gutters-bgColor: #0d1117;
   --codeMirror-gutterMarker-fgColor-default: #0d1117;
-    --codeMirror-gutterMarker-fgColor-muted: #7d8590;
-    --codeMirror-lineNumber-fgColor: #7d8590;
+    --codeMirror-gutterMarker-fgColor-muted: #848d97;
+    --codeMirror-lineNumber-fgColor: #848d97;
   --codeMirror-cursor-fgColor: #e6edf3;
   --codeMirror-selection-bgColor: #388bfd66;
   --codeMirror-activeline-bgColor: #6e768166;
@@ -480,7 +480,7 @@
   --control-borderColor-success: #1f6feb;
   --control-borderColor-danger: #da3633;
   --control-borderColor-warning: #9e6a03;
-    --control-iconColor-rest: #7d8590;
+    --control-iconColor-rest: #848d97;
   --control-transparent-bgColor-rest: #00000000;
   --control-transparent-bgColor-hover: #b1bac41f;
   --control-transparent-bgColor-active: #b1bac433;
@@ -507,7 +507,7 @@
   --controlTrack-bgColor-hover: #292e36;
   --controlTrack-bgColor-active: #31363e;
   --controlTrack-bgColor-disabled: #8b949e;
-    --controlTrack-fgColor-rest: #7d8590;
+    --controlTrack-fgColor-rest: #848d97;
   --controlTrack-fgColor-disabled: #ffffff;
   --controlTrack-borderColor-rest: #00000000;
   --controlTrack-borderColor-disabled: #8b949e;
@@ -544,7 +544,7 @@
   --button-invisible-fgColor-rest: #2f81f7;
   --button-invisible-fgColor-hover: #58a6ff;
   --button-invisible-fgColor-disabled: #8b949e;
-    --button-invisible-iconColor-rest: #7d8590;
+    --button-invisible-iconColor-rest: #848d97;
   --button-invisible-iconColor-hover: #e6edf3;
   --button-invisible-iconColor-disabled: #8b949e;
   --button-invisible-bgColor-rest: #00000000;
@@ -605,12 +605,12 @@
   --sideNav-bgColor-selected: #21262d;
   --skeletonLoader-bgColor: #161b22;
   --timelineBadge-bgColor: #21262d;
-    --treeViewItem-leadingVisual-iconColor-rest: #7d8590;
+    --treeViewItem-leadingVisual-iconColor-rest: #848d97;
   --underlineNav-borderColor-active: #f78166;
   --underlineNav-borderColor-hover: #6e768166;
-    --underlineNav-iconColor-rest: #7d8590;
+    --underlineNav-iconColor-rest: #848d97;
   --fgColor-default: #e6edf3;
-    --fgColor-muted: #7d8590;
+    --fgColor-muted: #848d97;
   --fgColor-onEmphasis: #ffffff;
   --fgColor-onInverse: #0d1117;
   --fgColor-disabled: #8b949e;

/css/functional/themes/dark.css

+++ /home/runner/work/primitives/primitives/tokens-next-private/css/functional/themes/dark.css	2023-11-22 19:29:47.449006978 +0000
@@ -14,13 +14,13 @@
 --diffBlob-deletion-bgColor-line: #f8514926;
 --diffBlob-deletion-bgColor-word: #f8514966;
 --diffBlob-hunk-bgColor-num: #388bfd66;
-  --diffBlob-expander-iconColor: #7d8590;
+  --diffBlob-expander-iconColor: #848d97;
 --codeMirror-fgColor: #e6edf3;
 --codeMirror-bgColor: #0d1117;
 --codeMirror-gutters-bgColor: #0d1117;
 --codeMirror-gutterMarker-fgColor-default: #0d1117;
-  --codeMirror-gutterMarker-fgColor-muted: #7d8590;
-  --codeMirror-lineNumber-fgColor: #7d8590;
+  --codeMirror-gutterMarker-fgColor-muted: #848d97;
+  --codeMirror-lineNumber-fgColor: #848d97;
 --codeMirror-cursor-fgColor: #e6edf3;
 --codeMirror-selection-bgColor: #388bfd66;
 --codeMirror-activeline-bgColor: #6e768166;
@@ -60,7 +60,7 @@
 --control-borderColor-success: #238636;
 --control-borderColor-danger: #da3633;
 --control-borderColor-warning: #9e6a03;
-  --control-iconColor-rest: #7d8590;
+  --control-iconColor-rest: #848d97;
 --control-transparent-bgColor-rest: #00000000;
 --control-transparent-bgColor-hover: #b1bac41f;
 --control-transparent-bgColor-active: #b1bac433;
@@ -87,7 +87,7 @@
 --controlTrack-bgColor-hover: #292e36;
 --controlTrack-bgColor-active: #31363e;
 --controlTrack-bgColor-disabled: #8b949e;
-  --controlTrack-fgColor-rest: #7d8590;
+  --controlTrack-fgColor-rest: #848d97;
 --controlTrack-fgColor-disabled: #ffffff;
 --controlTrack-borderColor-rest: #00000000;
 --controlTrack-borderColor-disabled: #8b949e;
@@ -124,7 +124,7 @@
 --button-invisible-fgColor-rest: #2f81f7;
 --button-invisible-fgColor-hover: #58a6ff;
 --button-invisible-fgColor-disabled: #8b949e;
-  --button-invisible-iconColor-rest: #7d8590;
+  --button-invisible-iconColor-rest: #848d97;
 --button-invisible-iconColor-hover: #e6edf3;
 --button-invisible-iconColor-disabled: #8b949e;
 --button-invisible-bgColor-rest: #00000000;
@@ -185,12 +185,12 @@
 --sideNav-bgColor-selected: #21262d;
 --skeletonLoader-bgColor: #161b22;
 --timelineBadge-bgColor: #21262d;
-  --treeViewItem-leadingVisual-iconColor-rest: #7d8590;
+  --treeViewItem-leadingVisual-iconColor-rest: #848d97;
 --underlineNav-borderColor-active: #f78166;
 --underlineNav-borderColor-hover: #6e768166;
-  --underlineNav-iconColor-rest: #7d8590;
+  --underlineNav-iconColor-rest: #848d97;
 --fgColor-default: #e6edf3;
-  --fgColor-muted: #7d8590;
+  --fgColor-muted: #848d97;
 --fgColor-onEmphasis: #ffffff;
 --fgColor-onInverse: #0d1117;
 --fgColor-disabled: #8b949e;
@@ -434,13 +434,13 @@
   --diffBlob-deletion-bgColor-line: #f8514926;
   --diffBlob-deletion-bgColor-word: #f8514966;
   --diffBlob-hunk-bgColor-num: #388bfd66;
-    --diffBlob-expander-iconColor: #7d8590;
+    --diffBlob-expander-iconColor: #848d97;
   --codeMirror-fgColor: #e6edf3;
   --codeMirror-bgColor: #0d1117;
   --codeMirror-gutters-bgColor: #0d1117;
   --codeMirror-gutterMarker-fgColor-default: #0d1117;
-    --codeMirror-gutterMarker-fgColor-muted: #7d8590;
-    --codeMirror-lineNumber-fgColor: #7d8590;
+    --codeMirror-gutterMarker-fgColor-muted: #848d97;
+    --codeMirror-lineNumber-fgColor: #848d97;
   --codeMirror-cursor-fgColor: #e6edf3;
   --codeMirror-selection-bgColor: #388bfd66;
   --codeMirror-activeline-bgColor: #6e768166;
@@ -480,7 +480,7 @@
   --control-borderColor-success: #238636;
   --control-borderColor-danger: #da3633;
   --control-borderColor-warning: #9e6a03;
-    --control-iconColor-rest: #7d8590;
+    --control-iconColor-rest: #848d97;
   --control-transparent-bgColor-rest: #00000000;
   --control-transparent-bgColor-hover: #b1bac41f;
   --control-transparent-bgColor-active: #b1bac433;
@@ -507,7 +507,7 @@
   --controlTrack-bgColor-hover: #292e36;
   --controlTrack-bgColor-active: #31363e;
   --controlTrack-bgColor-disabled: #8b949e;
-    --controlTrack-fgColor-rest: #7d8590;
+    --controlTrack-fgColor-rest: #848d97;
   --controlTrack-fgColor-disabled: #ffffff;
   --controlTrack-borderColor-rest: #00000000;
   --controlTrack-borderColor-disabled: #8b949e;
@@ -544,7 +544,7 @@
   --button-invisible-fgColor-rest: #2f81f7;
   --button-invisible-fgColor-hover: #58a6ff;
   --button-invisible-fgColor-disabled: #8b949e;
-    --button-invisible-iconColor-rest: #7d8590;
+    --button-invisible-iconColor-rest: #848d97;
   --button-invisible-iconColor-hover: #e6edf3;
   --button-invisible-iconColor-disabled: #8b949e;
   --button-invisible-bgColor-rest: #00000000;
@@ -605,12 +605,12 @@
   --sideNav-bgColor-selected: #21262d;
   --skeletonLoader-bgColor: #161b22;
   --timelineBadge-bgColor: #21262d;
-    --treeViewItem-leadingVisual-iconColor-rest: #7d8590;
+    --treeViewItem-leadingVisual-iconColor-rest: #848d97;
   --underlineNav-borderColor-active: #f78166;
   --underlineNav-borderColor-hover: #6e768166;
-    --underlineNav-iconColor-rest: #7d8590;
+    --underlineNav-iconColor-rest: #848d97;
   --fgColor-default: #e6edf3;
-    --fgColor-muted: #7d8590;
+    --fgColor-muted: #848d97;
   --fgColor-onEmphasis: #ffffff;
   --fgColor-onInverse: #0d1117;
   --fgColor-disabled: #8b949e;

@lukasoppermann
Copy link
Contributor

Hey @langermank I am in favor of changing the fgColor-muted as well. However we need to make sure that we preserve a 3:1 contrast between fgColor-muted and fgColor-default. Is this still 3:1 after the change?

@maximedegreve
Copy link

I'm also in favour of option 2.

@langermank
Copy link
Contributor Author

@lukasoppermann not quite.. I'm not sure that would be possible 🤔 is this close enough? Let me know if not and I can keep manipulating things.

contrast ratio between default and muted fg colors in dark mode

@lukasoppermann
Copy link
Contributor

@lukasoppermann not quite.. I'm not sure that would be possible 🤔 is this close enough? Let me know if not and I can keep manipulating things.

contrast ratio between default and muted fg colors in dark mode

Sadly in a11y it is either above or below the threshold. There is no close enough.

However I think since link underline preferences are shipped we don't require a 3:1 threshold anymore. Once confirmed we could remove them from the checks.

@langermank
Copy link
Contributor Author

For posterity, we decided to move forward with this change as we no longer require a 3:1 contrast ratio between default and muted. Previously, muted was the only way to indicate a link. Now we have the option to turn on underlines (which are on by default).

@langermank langermank added the update snapshots Update visual regression test snapshots label Nov 22, 2023
@github-actions github-actions bot removed the update snapshots Update visual regression test snapshots label Nov 22, 2023
@langermank langermank merged commit ba763cc into main Nov 22, 2023
26 checks passed
@langermank langermank deleted the adjust-default-control-bgcolor branch November 22, 2023 19:43
@primer primer bot mentioned this pull request Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants