-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* base * dark * light * kick off ci * Create funny-llamas-hunt.md * github-actions[bot] Regenerated snapshots * shadows * adjustments per vrt * github-actions[bot] Regenerated snapshots * fix hover state * adr * lint * changelog * lint * cleanup * fix * fix missing type * cleanup * github-actions[bot] Regenerated snapshots * fix danger button rest border * github-actions[bot] Regenerated snapshots * update transparent selected bg * reset * fix * github-actions[bot] Regenerated snapshots * change invisible to muted * reset * github-actions[bot] Regenerated snapshots --------- Co-authored-by: langermank <langermank@users.noreply.github.com>
- Loading branch information
1 parent
8b015a0
commit 39862e9
Showing
126 changed files
with
863 additions
and
988 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
"@primer/primitives": major | ||
--- | ||
|
||
# Updated neutral base color scales | ||
|
||
## Changes | ||
|
||
- Theme specific neutral scales have been replaced with two new scales: `light` and `dark`. | ||
- The new `light` and `dark` scales are inverted, where 0 is the lightest shade in `light` and the darkest shade in `dark`. | ||
- Functional color tokens have been updated to use the new `light` and `dark` scales, and several overrides have been removed due to the new inverted design. | ||
|
||
## Migration | ||
|
||
- Functional color tokens all work as expected and have been tested to meet minimum contrast requirements. | ||
- If you are using `primer/primitives` base color scales directly, you may need to update how those colors are applied. See the migration table which outlines approximately how the new colors map to the old colors. | ||
|
||
### Light scale migration | ||
|
||
| Old color | New color | | ||
| --------- | --------- | | ||
| `0` | `0` | | ||
| `1` | `2` | | ||
| `2` | `5` | | ||
| `3` | `7` | | ||
| `4` | `7` | | ||
| `5` | `8` | | ||
| `6` | `8` | | ||
| `7` | `9` | | ||
| `8` | `10` | | ||
| `9` | `11` | | ||
|
||
### Dark scale migration | ||
|
||
| Old color | New color | | ||
| --------- | --------- | | ||
| `9` | `0` | | ||
| `8` | `1` | | ||
| `7` | `2` | | ||
| `6` | `4` | | ||
| `5` | `6` | | ||
| `4` | `7` | | ||
| `3` | `8` | | ||
| `2` | `9` | | ||
| `1` | `10` | | ||
| `0` | `11` | | ||
|
||
### Dark high contrast scale migration | ||
|
||
| Old color | New color | | ||
| --------- | --------- | | ||
| `9` | `0` | | ||
| `8` | `3` | | ||
| `7` | `5` | | ||
| `6` | `6` | | ||
| `5` | `7` | | ||
| `4` | `8` | | ||
| `3` | `9` | | ||
| `2` | `10` | | ||
| `1` | `11` | | ||
|
||
### Dark dimmed scale migration | ||
|
||
| Old color | New color | | ||
| --------- | --------- | | ||
| `9` | `1` | | ||
| `8` | `2` | | ||
| `7` | `4` | | ||
| `6` | `5` | | ||
| `5` | `6` | | ||
| `4` | `7` | | ||
| `3` | `7` | | ||
| `2` | `8` | | ||
| `1` | `9` | | ||
| `0` | `10` | | ||
|
||
|
||
### Light high contrast scale migration | ||
|
||
| Old color | New color | | ||
| --------- | --------- | | ||
| `0` | `white` | | ||
| `1` | `2` | | ||
| `2` | `5` | | ||
| `3` | `7` | | ||
| `4` | `7` | | ||
| `5` | `8` | | ||
| `6` | `9` | | ||
| `7` | `10` | | ||
| `8` | `11` | | ||
| `9` | `black` | |
Binary file modified
BIN
-3 Bytes
(100%)
...hots/storybook-all-color-swatches-dark-button-invisible-fgColor-hover-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
...shots/storybook-all-color-swatches-dark-button-invisible-fgColor-rest-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-102 Bytes
(88%)
...ts/storybook-all-color-swatches-dark-button-invisible-iconColor-hover-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-119 Bytes
(86%)
....test.ts-snapshots/storybook-all-color-swatches-dark-color-ansi-white-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
...ook-all-color-swatches-dark-colorblind-button-invisible-fgColor-hover-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
...book-all-color-swatches-dark-colorblind-button-invisible-fgColor-rest-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-102 Bytes
(88%)
...k-all-color-swatches-dark-colorblind-button-invisible-iconColor-hover-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-119 Bytes
(86%)
...apshots/storybook-all-color-swatches-dark-colorblind-color-ansi-white-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-262 Bytes
(93%)
...s/storybook-all-color-swatches-dark-colorblind-shadow-floating-medium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
...shots/storybook-all-color-swatches-dark-high-contrast-bgColor-default-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
...s/storybook-all-color-swatches-dark-high-contrast-bgColor-transparent-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
...s/storybook-all-color-swatches-dark-high-contrast-borderColor-default-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
.../storybook-all-color-swatches-dark-high-contrast-borderColor-emphasis-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
...ots/storybook-all-color-swatches-dark-high-contrast-borderColor-muted-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-105 Bytes
(88%)
...orybook-all-color-swatches-dark-high-contrast-borderColor-translucent-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-37 Bytes
(96%)
...ll-color-swatches-dark-high-contrast-button-danger-borderColor-active-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-37 Bytes
(96%)
...all-color-swatches-dark-high-contrast-button-danger-borderColor-hover-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
...-all-color-swatches-dark-high-contrast-button-danger-borderColor-rest-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
...l-color-swatches-dark-high-contrast-button-default-borderColor-active-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
...ll-color-swatches-dark-high-contrast-button-default-borderColor-hover-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
...all-color-swatches-dark-high-contrast-button-default-borderColor-rest-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-128 Bytes
(85%)
...all-color-swatches-dark-high-contrast-button-invisible-bgColor-active-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-145 Bytes
(83%)
...-all-color-swatches-dark-high-contrast-button-invisible-bgColor-hover-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(91%)
...-color-swatches-dark-high-contrast-button-invisible-borderColor-hover-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12 Bytes
(98%)
...-all-color-swatches-dark-high-contrast-button-invisible-fgColor-hover-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12 Bytes
(98%)
...k-all-color-swatches-dark-high-contrast-button-invisible-fgColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
+10 Bytes
(100%)
...ll-color-swatches-dark-high-contrast-button-invisible-iconColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-217 Bytes
(78%)
...ll-color-swatches-dark-high-contrast-button-outline-borderColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-109 Bytes
(87%)
...lor-swatches-dark-high-contrast-codeMirror-gutterMarker-fgColor-muted-linux.png
Oops, something went wrong.
Binary file modified
BIN
-109 Bytes
(87%)
...k-all-color-swatches-dark-high-contrast-codeMirror-lineNumber-fgColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-127 Bytes
(85%)
...l-color-swatches-dark-high-contrast-codeMirror-syntax-fgColor-comment-linux.png
Oops, something went wrong.
Binary file modified
BIN
-127 Bytes
(85%)
...orybook-all-color-swatches-dark-high-contrast-color-ansi-black-bright-linux.png
Oops, something went wrong.
Binary file modified
BIN
-99 Bytes
(88%)
...hots/storybook-all-color-swatches-dark-high-contrast-color-ansi-black-linux.png
Oops, something went wrong.
Binary file modified
BIN
-127 Bytes
(85%)
...shots/storybook-all-color-swatches-dark-high-contrast-color-ansi-gray-linux.png
Oops, something went wrong.
Binary file modified
BIN
-95 Bytes
(88%)
...ark-high-contrast-color-prettylights-syntax-sublimelinter-gutter-mark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-81 Bytes
(91%)
...ok-all-color-swatches-dark-high-contrast-control-borderColor-emphasis-linux.png
Oops, something went wrong.
Binary file modified
BIN
-81 Bytes
(91%)
...rybook-all-color-swatches-dark-high-contrast-control-borderColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-109 Bytes
(87%)
...torybook-all-color-swatches-dark-high-contrast-control-iconColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-81 Bytes
(91%)
...lor-swatches-dark-high-contrast-control-transparent-borderColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-81 Bytes
(91%)
...ok-all-color-swatches-dark-high-contrast-controlKnob-borderColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
+130 Bytes
(120%)
...s/storybook-all-color-swatches-dark-high-contrast-counter-borderColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-82 Bytes
(90%)
...k-all-color-swatches-dark-high-contrast-diffBlob-deletion-bgColor-num-linux.png
Oops, something went wrong.
Binary file modified
BIN
-109 Bytes
(87%)
...apshots/storybook-all-color-swatches-dark-high-contrast-fgColor-muted-linux.png
Oops, something went wrong.
Binary file modified
BIN
-131 Bytes
(86%)
...book-all-color-swatches-dark-high-contrast-header-borderColor-divider-linux.png
Oops, something went wrong.
Binary file modified
BIN
-74 Bytes
(91%)
...rybook-all-color-swatches-dark-high-contrast-overlay-backdrop-bgColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-81 Bytes
(91%)
...s/storybook-all-color-swatches-dark-high-contrast-overlay-borderColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-81 Bytes
(91%)
...torybook-all-color-swatches-dark-high-contrast-selectMenu-borderColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-1.94 KB
(59%)
...storybook-all-color-swatches-dark-high-contrast-shadow-floating-large-linux.png
Oops, something went wrong.
Binary file modified
BIN
-870 Bytes
(74%)
...torybook-all-color-swatches-dark-high-contrast-shadow-floating-medium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-469 Bytes
(78%)
...storybook-all-color-swatches-dark-high-contrast-shadow-floating-small-linux.png
Oops, something went wrong.
Binary file modified
BIN
-1.87 KB
(59%)
...torybook-all-color-swatches-dark-high-contrast-shadow-floating-xlarge-linux.png
Oops, something went wrong.
Binary file modified
BIN
-109 Bytes
(87%)
...swatches-dark-high-contrast-treeViewItem-leadingVisual-iconColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-109 Bytes
(87%)
...ook-all-color-swatches-dark-high-contrast-underlineNav-iconColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-262 Bytes
(93%)
...ts-snapshots/storybook-all-color-swatches-dark-shadow-floating-medium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-180 Bytes
(92%)
....ts-snapshots/storybook-all-color-swatches-dark-shadow-floating-small-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
...ook-all-color-swatches-dark-tritanopia-button-invisible-fgColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
...book-all-color-swatches-dark-tritanopia-button-invisible-fgColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-102 Bytes
(88%)
...k-all-color-swatches-dark-tritanopia-button-invisible-iconColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-119 Bytes
(86%)
...apshots/storybook-all-color-swatches-dark-tritanopia-color-ansi-white-linux.png
Oops, something went wrong.
Binary file modified
BIN
-804 Bytes
(86%)
...ts/storybook-all-color-swatches-dark-tritanopia-shadow-floating-large-linux.png
Oops, something went wrong.
Binary file modified
BIN
-929 Bytes
(85%)
...s/storybook-all-color-swatches-dark-tritanopia-shadow-floating-xlarge-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(99%)
...ots/storybook-all-color-swatches-light-button-invisible-fgColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(99%)
...hots/storybook-all-color-swatches-light-button-invisible-fgColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(99%)
...ok-all-color-swatches-light-colorblind-button-invisible-fgColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(99%)
...ook-all-color-swatches-light-colorblind-button-invisible-fgColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-107 Bytes
(88%)
...hots/storybook-all-color-swatches-light-high-contrast-bgColor-default-linux.png
Oops, something went wrong.
Binary file modified
BIN
-107 Bytes
(88%)
.../storybook-all-color-swatches-light-high-contrast-bgColor-transparent-linux.png
Oops, something went wrong.
Binary file modified
BIN
-107 Bytes
(88%)
...ts/storybook-all-color-swatches-light-high-contrast-borderColor-muted-linux.png
Oops, something went wrong.
Binary file modified
BIN
-107 Bytes
(88%)
...book-all-color-swatches-light-high-contrast-borderColor-neutral-muted-linux.png
Oops, something went wrong.
Binary file modified
BIN
-105 Bytes
(88%)
...rybook-all-color-swatches-light-high-contrast-borderColor-translucent-linux.png
Oops, something went wrong.
Binary file modified
BIN
-59 Bytes
(93%)
...l-color-swatches-light-high-contrast-button-danger-borderColor-active-linux.png
Oops, something went wrong.
Binary file modified
BIN
-59 Bytes
(93%)
...ll-color-swatches-light-high-contrast-button-danger-borderColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-130 Bytes
(85%)
...ll-color-swatches-light-high-contrast-button-invisible-bgColor-active-linux.png
Oops, something went wrong.
Binary file modified
BIN
-131 Bytes
(84%)
...all-color-swatches-light-high-contrast-button-invisible-bgColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-13 Bytes
(98%)
...all-color-swatches-light-high-contrast-button-invisible-fgColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-13 Bytes
(98%)
...-all-color-swatches-light-high-contrast-button-invisible-fgColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
+81 Bytes
(110%)
...l-color-swatches-light-high-contrast-button-invisible-iconColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(87%)
...ll-color-swatches-light-high-contrast-button-invisible-iconColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-234 Bytes
(77%)
...-color-swatches-light-high-contrast-button-outline-borderColor-active-linux.png
Oops, something went wrong.
Binary file modified
BIN
-234 Bytes
(77%)
...l-color-swatches-light-high-contrast-button-outline-borderColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(87%)
...or-swatches-light-high-contrast-codeMirror-gutterMarker-fgColor-muted-linux.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(87%)
...-all-color-swatches-light-high-contrast-codeMirror-lineNumber-fgColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(87%)
...orybook-all-color-swatches-light-high-contrast-control-iconColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
+122 Bytes
(120%)
...r-swatches-light-high-contrast-control-transparent-borderColor-active-linux.png
Oops, something went wrong.
Binary file modified
BIN
-116 Bytes
(86%)
...ok-all-color-swatches-light-high-contrast-controlTrack-bgColor-active-linux.png
Oops, something went wrong.
Binary file modified
BIN
-114 Bytes
(87%)
...book-all-color-swatches-light-high-contrast-controlTrack-fgColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(87%)
...ok-all-color-swatches-light-high-contrast-diffBlob-expander-iconColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(87%)
...pshots/storybook-all-color-swatches-light-high-contrast-fgColor-muted-linux.png
Oops, something went wrong.
Binary file modified
BIN
-111 Bytes
(87%)
...ybook-all-color-swatches-light-high-contrast-headerSearch-borderColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-82 Bytes
(90%)
...ybook-all-color-swatches-light-high-contrast-overlay-backdrop-bgColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-107 Bytes
(88%)
.../storybook-all-color-swatches-light-high-contrast-overlay-borderColor-linux.png
Oops, something went wrong.
Binary file modified
BIN
-1.09 KB
(84%)
...torybook-all-color-swatches-light-high-contrast-shadow-floating-large-linux.png
Oops, something went wrong.
Binary file modified
BIN
-435 Bytes
(89%)
...orybook-all-color-swatches-light-high-contrast-shadow-floating-medium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-1007 Bytes
(85%)
...orybook-all-color-swatches-light-high-contrast-shadow-floating-xlarge-linux.png
Oops, something went wrong.
Binary file modified
BIN
-107 Bytes
(88%)
...all-color-swatches-light-high-contrast-underlineNav-borderColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(87%)
...ok-all-color-swatches-light-high-contrast-underlineNav-iconColor-rest-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(99%)
...ok-all-color-swatches-light-tritanopia-button-invisible-fgColor-hover-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(99%)
...ook-all-color-swatches-light-tritanopia-button-invisible-fgColor-rest-linux.png
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Title | ||
|
||
## Status | ||
|
||
| Stage | Status | | ||
| -------- | ----------- | | ||
| Approved | <!-- ✅ --> | | ||
| Adopted | <!-- 🚧 --> | | ||
|
||
## Decision | ||
|
||
Individual theme neutral scales will be replaced with two new neutral scales: `light` and `dark`. These scales have additional values (12 total) to accommodate contrast adjustments and state. | ||
|
||
This document outlines key design decisions made for these new neutral scales. | ||
|
||
## Context | ||
|
||
### General scale generation | ||
|
||
The goal was to make adjustments with minimal impact on the existing theme designs. For light default, shade 0 remains the same value as it's a prominent background color used throughout GitHub. All other steps are based on this value by adjusting saturation and lightness. | ||
|
||
### Saturation adjustments | ||
|
||
**Light** | ||
|
||
Shade 0 leans blue with roughly 30% saturation and is the most blue shade of the scale. The saturation gradually declines with a more abrupt drop at shade 7 where the lightness is 55%. Therefore, the darker shades lean more neutral. | ||
|
||
**Dark** | ||
|
||
Shade 11 leans blue with roughly 70% saturation. The saturation gradually declines until shade 6 where it begins to increase eventually landing at roughly 30%. | ||
|
||
### Each step serves a purpose | ||
|
||
0 – 5: Backgrounds | ||
6 – 7: Borders | ||
8 – 11: Text and icons | ||
|
||
### Increase background shades | ||
|
||
The new scales accommodate component states such as rest, hover, and active for all levels of contrast (dimmed, default, high) by providing additional shades with subtle lightness adjustments. A lower contrast theme may start at shade 0 for rest, 1 for hover and 2 for active, while a higher contrast theme may start at shade 3 for rest, 4 for hover and 5 for active. | ||
|
||
### Add minimum shade for 3:1 contrast | ||
|
||
Step 7 in both light and dark is the minimum border contrast for interactive controls against `bgColor-muted` or shade 0 in default themes. This is a 3:1 contrast ratio for WCAG AA compliance. We don't use this shade for all interactive borders today, but it's available for use in the future. | ||
|
||
### Impact | ||
|
||
- Maintaining 2 scales is easier than 5 scales | ||
- We can remove color mix hacks and overrides for state colors | ||
- We can adjust light default to be WCAG compliant and still have room to add a new "light bright" theme with these scales | ||
- High contrast themes have more flexibility | ||
|
||
### Alternatives | ||
|
||
We add a 6th neutral scale for a future "light bright" theme. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.