Skip to content

Commit 9df92a7

Browse files
some follow-up fixes (#542)
* some follow-up a11y improvements
1 parent c4e7a01 commit 9df92a7

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

.changeset/hungry-eels-explain.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@primer/primitives': patch
3+
---
4+
5+
- accent.subtle in dark is less opaque to have a 4.5 contrast with new accent color
6+
- danger and close fg slightly changed in light mode to contrast with fg.default (as we have some red links)
7+
- attention.emphasis darker to have 4.5:1 contrast with fg.onEmphasis

data/colors/vars/global_dark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default {
3636
fg: '#2f81f7',
3737
emphasis: get('scale.blue.5'),
3838
muted: alpha(get('scale.blue.4'), 0.4),
39-
subtle: alpha(get('scale.blue.4'), 0.15)
39+
subtle: alpha(get('scale.blue.4'), 0.1)
4040
},
4141
success: {
4242
fg: get('scale.green.3'),

data/colors/vars/global_light.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default {
4646
},
4747
attention: {
4848
fg: get('scale.yellow.5'),
49-
emphasis: get('scale.yellow.4'),
49+
emphasis: get('scale.yellow.5'),
5050
muted: alpha(get('scale.yellow.3'), 0.4),
5151
subtle: get('scale.yellow.0')
5252
},
@@ -57,7 +57,7 @@ export default {
5757
subtle: get('scale.orange.0')
5858
},
5959
danger: {
60-
fg: get('scale.red.5'),
60+
fg: '#d1242f',
6161
emphasis: get('scale.red.5'),
6262
muted: alpha(get('scale.red.3'), 0.4),
6363
subtle: get('scale.red.0')
@@ -69,7 +69,7 @@ export default {
6969
subtle: get('scale.green.0')
7070
},
7171
closed: {
72-
fg: get('scale.red.5'),
72+
fg: get('danger.fg'),
7373
emphasis: get('scale.red.5'),
7474
muted: alpha(get('scale.red.3'), 0.4),
7575
subtle: get('scale.red.0')

src/tokens/functional/color/dark/primitives-dark.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
muted: {
118118
$value: '{base.color.blue.4}',
119119
$type: 'color',
120-
alpha: 0.15,
120+
alpha: 0.1,
121121
},
122122
emphasis: {
123123
$value: '{base.color.blue.5}',

src/tokens/functional/color/light/primitives-light.json5

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,17 @@
5959
danger: {
6060
$value: '{base.color.red.5}',
6161
$type: 'color',
62+
mix: {
63+
color: '{base.color.red.4}',
64+
weight: 0.05,
65+
},
6266
},
6367
open: {
6468
$value: '{fgColor.success}',
6569
$type: 'color',
6670
},
6771
closed: {
68-
$value: '{base.color.red.5}',
72+
$value: '{fgColor.danger}',
6973
$type: 'color',
7074
},
7175
done: {
@@ -135,7 +139,7 @@
135139
$type: 'color',
136140
},
137141
emphasis: {
138-
$value: '{base.color.yellow.4}',
142+
$value: '{base.color.yellow.5}',
139143
$type: 'color',
140144
},
141145
},

0 commit comments

Comments
 (0)