diff --git a/.changeset/hungry-eels-explain.md b/.changeset/hungry-eels-explain.md new file mode 100644 index 000000000..f648cc874 --- /dev/null +++ b/.changeset/hungry-eels-explain.md @@ -0,0 +1,7 @@ +--- +'@primer/primitives': patch +--- + +- accent.subtle in dark is less opaque to have a 4.5 contrast with new accent color +- danger and close fg slightly changed in light mode to contrast with fg.default (as we have some red links) +- attention.emphasis darker to have 4.5:1 contrast with fg.onEmphasis diff --git a/data/colors/vars/global_dark.ts b/data/colors/vars/global_dark.ts index fe83f93b0..e7e5cf187 100644 --- a/data/colors/vars/global_dark.ts +++ b/data/colors/vars/global_dark.ts @@ -36,7 +36,7 @@ export default { fg: '#2f81f7', emphasis: get('scale.blue.5'), muted: alpha(get('scale.blue.4'), 0.4), - subtle: alpha(get('scale.blue.4'), 0.15) + subtle: alpha(get('scale.blue.4'), 0.1) }, success: { fg: get('scale.green.3'), diff --git a/data/colors/vars/global_light.ts b/data/colors/vars/global_light.ts index c5ca7a2d7..428c418ba 100644 --- a/data/colors/vars/global_light.ts +++ b/data/colors/vars/global_light.ts @@ -46,7 +46,7 @@ export default { }, attention: { fg: get('scale.yellow.5'), - emphasis: get('scale.yellow.4'), + emphasis: get('scale.yellow.5'), muted: alpha(get('scale.yellow.3'), 0.4), subtle: get('scale.yellow.0') }, @@ -57,7 +57,7 @@ export default { subtle: get('scale.orange.0') }, danger: { - fg: get('scale.red.5'), + fg: '#d1242f', emphasis: get('scale.red.5'), muted: alpha(get('scale.red.3'), 0.4), subtle: get('scale.red.0') @@ -69,7 +69,7 @@ export default { subtle: get('scale.green.0') }, closed: { - fg: get('scale.red.5'), + fg: get('danger.fg'), emphasis: get('scale.red.5'), muted: alpha(get('scale.red.3'), 0.4), subtle: get('scale.red.0') diff --git a/src/tokens/functional/color/dark/primitives-dark.json5 b/src/tokens/functional/color/dark/primitives-dark.json5 index 34dfb46b8..c710e81de 100644 --- a/src/tokens/functional/color/dark/primitives-dark.json5 +++ b/src/tokens/functional/color/dark/primitives-dark.json5 @@ -117,7 +117,7 @@ muted: { $value: '{base.color.blue.4}', $type: 'color', - alpha: 0.15, + alpha: 0.1, }, emphasis: { $value: '{base.color.blue.5}', diff --git a/src/tokens/functional/color/light/primitives-light.json5 b/src/tokens/functional/color/light/primitives-light.json5 index e598c0bf4..1e957e933 100644 --- a/src/tokens/functional/color/light/primitives-light.json5 +++ b/src/tokens/functional/color/light/primitives-light.json5 @@ -59,13 +59,17 @@ danger: { $value: '{base.color.red.5}', $type: 'color', + mix: { + color: '{base.color.red.4}', + weight: 0.05, + }, }, open: { $value: '{fgColor.success}', $type: 'color', }, closed: { - $value: '{base.color.red.5}', + $value: '{fgColor.danger}', $type: 'color', }, done: { @@ -135,7 +139,7 @@ $type: 'color', }, emphasis: { - $value: '{base.color.yellow.4}', + $value: '{base.color.yellow.5}', $type: 'color', }, },