-
Notifications
You must be signed in to change notification settings - Fork 43
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
Improve contrast for Buttons with counters #641
Conversation
🦋 Changeset detectedLatest commit: d78bba1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Variables changed--- base/dist/scss/colors/_dark.scss 2023-05-09 00:17:22.491457026 +0000
+++ dist/scss/colors/_dark.scss 2023-05-09 00:17:05.163390644 +0000
@@ -217,4 +217,4 @@
--color-btn-primary-icon: #ffffff;
- --color-btn-primary-counter-bg: rgba(255,255,255,0.2);
- --color-btn-outline-text: #58a6ff;
+ --color-btn-primary-counter-bg: rgba(4,38,15,0.2);
+ --color-btn-outline-text: #388bfd;
--color-btn-outline-hover-text: #58a6ff;
@@ -224,3 +224,3 @@
--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
- --color-btn-outline-hover-counter-bg: rgba(255,255,255,0.2);
+ --color-btn-outline-hover-counter-bg: rgba(5,29,77,0.2);
--color-btn-outline-selected-text: #ffffff;
@@ -232,3 +232,6 @@
--color-btn-outline-disabled-counter-bg: rgba(31,111,235,0.05);
- --color-btn-outline-counter-bg: rgba(31,111,235,0.1);
+ --color-btn-outline-counter-bg: rgba(5,29,77,0.2);
+ --color-btn-outline-hover-counter-fg: #58a6ff;
+ --color-btn-outline-disabled-counter-fg: rgba(47,129,247,0.5);
+ --color-btn-outline-counter-fg: #388bfd;
--color-btn-danger-text: #f85149;
@@ -248,4 +251,7 @@
--color-btn-danger-disabled-counter-bg: rgba(218,54,51,0.05);
- --color-btn-danger-counter-bg: rgba(218,54,51,0.1);
+ --color-btn-danger-counter-bg: rgba(73,2,2,0.2);
--color-btn-danger-icon: #f85149;
+ --color-btn-danger-counter-fg: #f85149;
+ --color-btn-danger-disabled-counter-fg: rgba(248,81,73,0.5);
+ --color-btn-danger-hover-counter-fg: #ffffff;
--color-underlinenav-icon: #6e7681;
--- base/dist/scss/colors/_dark_colorblind.scss 2023-05-09 00:17:22.503457071 +0000
+++ dist/scss/colors/_dark_colorblind.scss 2023-05-09 00:17:05.175390688 +0000
@@ -217,4 +217,4 @@
--color-btn-primary-icon: #ffffff;
- --color-btn-primary-counter-bg: rgba(255,255,255,0.2);
- --color-btn-outline-text: #58a6ff;
+ --color-btn-primary-counter-bg: rgba(5,29,77,0.2);
+ --color-btn-outline-text: #388bfd;
--color-btn-outline-hover-text: #58a6ff;
@@ -224,3 +224,3 @@
--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
- --color-btn-outline-hover-counter-bg: rgba(255,255,255,0.2);
+ --color-btn-outline-hover-counter-bg: rgba(5,29,77,0.2);
--color-btn-outline-selected-text: #ffffff;
@@ -232,3 +232,6 @@
--color-btn-outline-disabled-counter-bg: rgba(31,111,235,0.05);
- --color-btn-outline-counter-bg: rgba(31,111,235,0.1);
+ --color-btn-outline-counter-bg: rgba(5,29,77,0.2);
+ --color-btn-outline-hover-counter-fg: #58a6ff;
+ --color-btn-outline-disabled-counter-fg: rgba(88,166,255,0.5);
+ --color-btn-outline-counter-fg: #388bfd;
--color-btn-danger-text: #d47616;
@@ -248,4 +251,7 @@
--color-btn-danger-disabled-counter-bg: rgba(183,97,0,0.05);
- --color-btn-danger-counter-bg: rgba(183,97,0,0.1);
+ --color-btn-danger-counter-bg: rgba(51,28,4,0.2);
--color-btn-danger-icon: #d47616;
+ --color-btn-danger-counter-fg: #d47616;
+ --color-btn-danger-disabled-counter-fg: rgba(212,118,22,0.5);
+ --color-btn-danger-hover-counter-fg: #ffffff;
--color-underlinenav-icon: #6e7681;
--- base/dist/scss/colors/_dark_dimmed.scss 2023-05-09 00:17:22.495457041 +0000
+++ dist/scss/colors/_dark_dimmed.scss 2023-05-09 00:17:05.167390658 +0000
@@ -217,4 +217,4 @@
--color-btn-primary-icon: #cdd9e5;
- --color-btn-primary-counter-bg: rgba(205,217,229,0.2);
- --color-btn-outline-text: #539bf5;
+ --color-btn-primary-counter-bg: rgba(17,52,23,0.2);
+ --color-btn-outline-text: #4184e4;
--color-btn-outline-hover-text: #539bf5;
@@ -224,3 +224,3 @@
--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(205,217,229,0.03);
- --color-btn-outline-hover-counter-bg: rgba(205,217,229,0.2);
+ --color-btn-outline-hover-counter-bg: rgba(15,45,92,0.2);
--color-btn-outline-selected-text: #cdd9e5;
@@ -232,3 +232,6 @@
--color-btn-outline-disabled-counter-bg: rgba(49,109,202,0.05);
- --color-btn-outline-counter-bg: rgba(49,109,202,0.1);
+ --color-btn-outline-counter-bg: rgba(15,45,92,0.2);
+ --color-btn-outline-hover-counter-fg: #539bf5;
+ --color-btn-outline-disabled-counter-fg: rgba(83,155,245,0.5);
+ --color-btn-outline-counter-fg: #4184e4;
--color-btn-danger-text: #e5534b;
@@ -248,4 +251,7 @@
--color-btn-danger-disabled-counter-bg: rgba(201,60,55,0.05);
- --color-btn-danger-counter-bg: rgba(201,60,55,0.1);
+ --color-btn-danger-counter-bg: rgba(93,15,18,0.2);
--color-btn-danger-icon: #e5534b;
+ --color-btn-danger-counter-fg: #e5534b;
+ --color-btn-danger-disabled-counter-fg: rgba(229,83,75,0.5);
+ --color-btn-danger-hover-counter-fg: #cdd9e5;
--color-underlinenav-icon: #636e7b;
--- base/dist/scss/colors/_dark_high_contrast.scss 2023-05-09 00:17:22.499457056 +0000
+++ dist/scss/colors/_dark_high_contrast.scss 2023-05-09 00:17:05.171390673 +0000
@@ -218,3 +218,3 @@
--color-btn-primary-counter-bg: rgba(1,4,9,0.15);
- --color-btn-outline-text: #71b7ff;
+ --color-btn-outline-text: #409eff;
--color-btn-outline-hover-text: #71b7ff;
@@ -224,3 +224,3 @@
--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
- --color-btn-outline-hover-counter-bg: rgba(255,255,255,0.2);
+ --color-btn-outline-hover-counter-bg: rgba(25,79,177,0.2);
--color-btn-outline-selected-text: #ffffff;
@@ -232,3 +232,6 @@
--color-btn-outline-disabled-counter-bg: rgba(64,158,255,0.05);
- --color-btn-outline-counter-bg: rgba(64,158,255,0.1);
+ --color-btn-outline-counter-bg: rgba(25,79,177,0.2);
+ --color-btn-outline-hover-counter-fg: #71b7ff;
+ --color-btn-outline-disabled-counter-fg: rgba(113,183,255,0.5);
+ --color-btn-outline-counter-fg: #409eff;
--color-btn-danger-text: #ff6a69;
@@ -250,2 +253,5 @@
--color-btn-danger-icon: #ff6a69;
+ --color-btn-danger-counter-fg: #ff6a69;
+ --color-btn-danger-disabled-counter-fg: rgba(255,106,105,0.5);
+ --color-btn-danger-hover-counter-fg: #ffffff;
--color-underlinenav-icon: #f0f3f6;
--- base/dist/scss/colors/_dark_tritanopia.scss 2023-05-09 00:17:22.507457086 +0000
+++ dist/scss/colors/_dark_tritanopia.scss 2023-05-09 00:17:05.183390717 +0000
@@ -217,4 +217,4 @@
--color-btn-primary-icon: #ffffff;
- --color-btn-primary-counter-bg: rgba(255,255,255,0.2);
- --color-btn-outline-text: #58a6ff;
+ --color-btn-primary-counter-bg: rgba(5,29,77,0.2);
+ --color-btn-outline-text: #388bfd;
--color-btn-outline-hover-text: #58a6ff;
@@ -224,3 +224,3 @@
--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
- --color-btn-outline-hover-counter-bg: rgba(255,255,255,0.2);
+ --color-btn-outline-hover-counter-bg: rgba(5,29,77,0.2);
--color-btn-outline-selected-text: #ffffff;
@@ -232,3 +232,6 @@
--color-btn-outline-disabled-counter-bg: rgba(31,111,235,0.05);
- --color-btn-outline-counter-bg: rgba(31,111,235,0.1);
+ --color-btn-outline-counter-bg: rgba(5,29,77,0.2);
+ --color-btn-outline-hover-counter-fg: #58a6ff;
+ --color-btn-outline-disabled-counter-fg: rgba(88,166,255,0.5);
+ --color-btn-outline-counter-fg: #388bfd;
--color-btn-danger-text: #f85149;
@@ -248,4 +251,7 @@
--color-btn-danger-disabled-counter-bg: rgba(218,54,51,0.05);
- --color-btn-danger-counter-bg: rgba(218,54,51,0.1);
+ --color-btn-danger-counter-bg: rgba(73,2,2,0.2);
--color-btn-danger-icon: #f85149;
+ --color-btn-danger-counter-fg: #f85149;
+ --color-btn-danger-disabled-counter-fg: rgba(248,81,73,0.5);
+ --color-btn-danger-hover-counter-fg: #ffffff;
--color-underlinenav-icon: #6e7681;
--- base/dist/scss/colors/_light.scss 2023-05-09 00:17:22.455456890 +0000
+++ dist/scss/colors/_light.scss 2023-05-09 00:17:05.127390511 +0000
@@ -217,3 +217,3 @@
--color-btn-primary-icon: rgba(255,255,255,0.8);
- --color-btn-primary-counter-bg: rgba(255,255,255,0.2);
+ --color-btn-primary-counter-bg: rgba(0,45,17,0.2);
--color-btn-outline-text: #0969da;
@@ -232,3 +232,6 @@
--color-btn-outline-disabled-counter-bg: rgba(9,105,218,0.05);
- --color-btn-outline-counter-bg: rgba(9,105,218,0.1);
+ --color-btn-outline-counter-bg: #0969da1a;
+ --color-btn-outline-counter-fg: #0550ae;
+ --color-btn-outline-hover-counter-fg: #ffffff;
+ --color-btn-outline-disabled-counter-fg: rgba(9,105,218,0.5);
--color-btn-danger-text: #cf222e;
@@ -250,2 +253,5 @@
--color-btn-danger-hover-icon: #ffffff;
+ --color-btn-danger-counter-fg: #c21c2c;
+ --color-btn-danger-hover-counter-fg: #ffffff;
+ --color-btn-danger-disabled-counter-fg: rgba(207,34,46,0.5);
--color-underlinenav-icon: #6e7781;
--- base/dist/scss/colors/_light_colorblind.scss 2023-05-09 00:17:22.471456950 +0000
+++ dist/scss/colors/_light_colorblind.scss 2023-05-09 00:17:05.151390599 +0000
@@ -217,3 +217,3 @@
--color-btn-primary-icon: rgba(255,255,255,0.8);
- --color-btn-primary-counter-bg: rgba(255,255,255,0.2);
+ --color-btn-primary-counter-bg: rgba(0,33,85,0.2);
--color-btn-outline-text: #0969da;
@@ -232,3 +232,6 @@
--color-btn-outline-disabled-counter-bg: rgba(9,105,218,0.05);
- --color-btn-outline-counter-bg: rgba(9,105,218,0.1);
+ --color-btn-outline-counter-bg: #0969da1a;
+ --color-btn-outline-counter-fg: #0550ae;
+ --color-btn-outline-hover-counter-fg: #ffffff;
+ --color-btn-outline-disabled-counter-fg: rgba(9,105,218,0.5);
--color-btn-danger-text: #b35900;
@@ -250,2 +253,5 @@
--color-btn-danger-hover-icon: #ffffff;
+ --color-btn-danger-counter-fg: #c21c2c;
+ --color-btn-danger-hover-counter-fg: #ffffff;
+ --color-btn-danger-disabled-counter-fg: rgba(179,89,0,0.5);
--color-underlinenav-icon: #6e7781;
--- base/dist/scss/colors/_light_high_contrast.scss 2023-05-09 00:17:22.463456920 +0000
+++ dist/scss/colors/_light_high_contrast.scss 2023-05-09 00:17:05.143390570 +0000
@@ -217,3 +217,3 @@
--color-btn-primary-icon: rgba(255,255,255,0.8);
- --color-btn-primary-counter-bg: rgba(255,255,255,0.2);
+ --color-btn-primary-counter-bg: rgba(0,35,11,0.2);
--color-btn-outline-text: #023b95;
@@ -232,3 +232,6 @@
--color-btn-outline-disabled-counter-bg: rgba(3,73,180,0.05);
- --color-btn-outline-counter-bg: rgba(3,73,180,0.1);
+ --color-btn-outline-counter-bg: #0969da1a;
+ --color-btn-outline-counter-fg: #023b95;
+ --color-btn-outline-hover-counter-fg: #ffffff;
+ --color-btn-outline-disabled-counter-fg: rgba(3,73,180,0.5);
--color-btn-danger-text: #86061d;
@@ -250,2 +253,5 @@
--color-btn-danger-hover-icon: #ffffff;
+ --color-btn-danger-counter-fg: #c21c2c;
+ --color-btn-danger-hover-counter-fg: #ffffff;
+ --color-btn-danger-disabled-counter-fg: rgba(160,17,31,0.5);
--color-underlinenav-icon: #66707b;
--- base/dist/scss/colors/_light_tritanopia.scss 2023-05-09 00:17:22.487457011 +0000
+++ dist/scss/colors/_light_tritanopia.scss 2023-05-09 00:17:05.155390614 +0000
@@ -217,3 +217,3 @@
--color-btn-primary-icon: rgba(255,255,255,0.8);
- --color-btn-primary-counter-bg: rgba(255,255,255,0.2);
+ --color-btn-primary-counter-bg: rgba(0,33,85,0.2);
--color-btn-outline-text: #0969da;
@@ -232,3 +232,6 @@
--color-btn-outline-disabled-counter-bg: rgba(9,105,218,0.05);
- --color-btn-outline-counter-bg: rgba(9,105,218,0.1);
+ --color-btn-outline-counter-bg: #0969da1a;
+ --color-btn-outline-counter-fg: #0550ae;
+ --color-btn-outline-hover-counter-fg: #ffffff;
+ --color-btn-outline-disabled-counter-fg: rgba(9,105,218,0.5);
--color-btn-danger-text: #cf222e;
@@ -250,2 +253,5 @@
--color-btn-danger-hover-icon: #ffffff;
+ --color-btn-danger-counter-fg: #c21c2c;
+ --color-btn-danger-hover-counter-fg: #ffffff;
+ --color-btn-danger-disabled-counter-fg: rgba(207,34,46,0.5);
--color-underlinenav-icon: #6e7781; |
Design Token Diff
|
Design Token Contrast Check
|
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
: ❌ 9 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.07: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 | ✅ | 4.63:1 | 4.5:1 |
fg.default vs. canvas.inset | ✅ | 17.37:1 | 4.5:1 |
fg.muted vs. canvas.inset | ✅ | 5.5:1 | 4.5:1 |
fg.default vs. accent.fg | ✅ | 3.17:1 | 3:1 |
fg.default vs. fg.muted | ✅ | 3.15: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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice updates
@langermank I believe there is an issue with the outline of the primary button. It should be dark, not light. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍🏻
* button counters * hover states * add to old tokens * use scale colors * test disabled state * Create weak-wasps-drop.md * fix button border colors
Button
variantsdanger
,outline
, andprimary
are failing contrast checks when they have a counter label. This PR includes slight changes to the counter backgrounds, and adds new tokens for the counter label text color to achieve sufficient contrast.Additions
Legacy
btn.outline.hoverCounterFg
btn.outline.disabledCounterFg
btn.outline.counterFg
btn.danger.hoverCounterFg
btn.danger.disabledCounterFg
btn.danger.counterFg
v8
--button-invisible-fgColor-hover
(another contrast issue)--buttonCounter-outline-fgColor-rest
--buttonCounter-outline-fgColor-hover
--buttonCounter-outline-fgColor-disabled
--buttonCounter-danger-fgColor-rest
--buttonCounter-danger-fgColor-hover
--buttonCounter-danger-fgColor-disabled
Test
Check out the preview Storybook
Screenshots
Light before:
Light after:
Dark before:
Dark after: