Skip to content

Commit

Permalink
Merge branch 'main' into light-proDeu
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann authored May 3, 2023
2 parents 08966db + b8bc786 commit 1142d90
Show file tree
Hide file tree
Showing 5 changed files with 506 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-trains-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/primitives': patch
---

Replace dark-colorblind scale with overrides
5 changes: 5 additions & 0 deletions .changeset/tiny-wolves-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/primitives': patch
---

Replaces light Tritanopia scale with overrides
14 changes: 10 additions & 4 deletions scripts/themes.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ export const themes: TokenBuildInput[] = [
source: [
`src/tokens/functional/color/light/*.json5`,
`src/tokens/functional/color/scales.json5`,
`src/tokens/functional/color/light/overrides/light.tritanopia.json5`,
`src/tokens/functional/shadow/light.json5`,
`src/tokens/functional/border/light.json5`,
`src/tokens/functional/color/light/overrides/light.tritanopia.json5`,
],
include: [
`src/tokens/base/color/light/light.json5`,
// `src/tokens/base/color/light/light.tritanopia.json5`
],
include: [`src/tokens/base/color/light/light.json5`, `src/tokens/base/color/light/light.tritanopia.json5`],
},
{
filename: 'light-colorblind',
Expand Down Expand Up @@ -84,11 +87,14 @@ export const themes: TokenBuildInput[] = [
source: [
`src/tokens/functional/color/dark/*.json5`,
`src/tokens/functional/color/scales.json5`,
`src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5`,
`src/tokens/functional/shadow/dark.json5`,
`src/tokens/functional/border/dark.json5`,
`src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5`,
],
include: [
`src/tokens/base/color/dark/dark.json5`,
// , `src/tokens/base/color/dark/dark.protanopia-deuteranopia.json5`
],
include: [`src/tokens/base/color/dark/dark.json5`, `src/tokens/base/color/dark/dark.protanopia-deuteranopia.json5`],
},
{
filename: 'dark-high-contrast',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
*/
{
fgColor: {
success: {
$value: '{base.color.blue.3}',
$type: 'color',
},
danger: {
$value: '{base.color.orange.4}',
$type: 'color',
},
open: {
$value: '{base.color.orange.3}',
$type: 'color',
Expand All @@ -15,6 +23,28 @@
},
},
bgColor: {
success: {
muted: {
$value: '{base.color.blue.4}',
$type: 'color',
alpha: 0.15,
},
emphasis: {
$value: '{base.color.blue.5}',
$type: 'color',
},
},
danger: {
muted: {
$value: '{base.color.orange.4}',
$type: 'color',
alpha: 0.1,
},
emphasis: {
$value: '{base.color.orange.5}',
$type: 'color',
},
},
open: {
muted: {
$value: '{base.color.orange.4}',
Expand Down Expand Up @@ -61,15 +91,250 @@
$type: 'color',
},
},
success: {
muted: {
$value: '{base.color.blue.4}',
$type: 'color',
alpha: 0.4,
},
emphasis: {
$value: '{base.color.blue.5}',
$type: 'color',
},
},
danger: {
muted: {
$value: '{base.color.orange.4}',
$type: 'color',
alpha: 0.4,
},
emphasis: {
$value: '{base.color.orange.5}',
$type: 'color',
},
},
},
control: {
danger: {
fgColor: {
hover: {
$value: '{base.color.orange.3}',
$type: 'color',
},
},
},
},
codeMirror: {
syntax: {
fgColor: {
keyword: {
$value: '{base.color.orange.3}',
$type: 'color',
},
storage: {
$value: '{base.color.orange.3}',
$type: 'color',
},
},
},
},
button: {
primary: {
bgColor: {
hover: {
$value: '{bgColor.success.emphasis}',
$type: 'color',
mix: {
color: '{base.color.blue.3}',
weight: 0.2,
},
},
active: {
$value: '{bgColor.success.emphasis}',
$type: 'color',
mix: {
color: '{base.color.blue.3}',
weight: 0.4,
},
},
disabled: {
$value: '{base.color.green.6}',
$value: '{base.color.blue.6}',
$type: 'color',
mix: null,
},
},
},
danger: {
bgColor: {
hover: {
$value: '{base.color.orange.6}',
$type: 'color',
},
active: {
$value: '{base.color.orange.6}',
$type: 'color',
mix: {
color: '{base.color.orange.4}',
weight: 0.4,
},
},
},
borderColor: {
hover: {
$value: '{base.color.orange.6}',
$type: 'color',
},
},
},
},
diffBlob: {
addition: {
bgColor: {
num: {
$value: '{base.color.blue.3}',
$type: 'color',
alpha: 0.3,
},
line: {
$value: '{base.color.blue.4}',
$type: 'color',
alpha: 0.15,
mix: null,
},
word: {
$value: '{base.color.blue.4}',
$type: 'color',
alpha: 0.4,
},
},
},
deletion: {
bgColor: {
num: {
$value: '{base.color.orange.4}',
$type: 'color',
alpha: 0.3,
},
line: {
$value: '{base.color.orange.4}',
$type: 'color',
alpha: 0.15,
mix: null,
},
word: {
$value: '{base.color.orange.4}',
$type: 'color',
alpha: 0.4,
},
},
},
},
color: {
ansi: {
green: {
$value: '{base.color.blue.3}',
$type: 'color',
},
'green-bright': {
$value: '{base.color.blue.2}',
$type: 'color',
},
red: {
$value: '{base.color.orange.3}',
$type: 'color',
},
'red-bright': {
$value: '{base.color.orange.2}',
$type: 'color',
},
},
prettylights: {
syntax: {
'entity-tag': {
$value: '{base.color.blue.1}',
$type: 'color',
},
keyword: {
$value: '{base.color.orange.3}',
$type: 'color',
},
brackethighlighter: {
unmatched: {
$value: '{base.color.orange.4}',
$type: 'color',
},
},
invalid: {
illegal: {
bg: {
$value: '{base.color.orange.7}',
$type: 'color',
},
},
},
carriage: {
return: {
bg: {
$value: '{base.color.orange.6}',
$type: 'color',
},
},
},
'string-regexp': {
$value: '{base.color.blue.1}',
$type: 'color',
},
markup: {
deleted: {
text: {
$value: '{base.color.orange.0}',
$type: 'color',
},
bg: {
$value: '{base.color.orange.8}',
$type: 'color',
},
},
inserted: {
text: {
$value: '{base.color.blue.0}',
$type: 'color',
},
bg: {
$value: '{base.color.blue.8}',
$type: 'color',
},
},
},
},
},
/**
* @description All overwrites for color scales
*/
scale: {
green: {
'0': {$value: '{base.color.blue.0}'},
'1': {$value: '{base.color.blue.1}'},
'2': {$value: '{base.color.blue.2}'},
'3': {$value: '{base.color.blue.3}'},
'4': {$value: '{base.color.blue.4}'},
'5': {$value: '{base.color.blue.5}'},
'6': {$value: '{base.color.blue.6}'},
'7': {$value: '{base.color.blue.7}'},
'8': {$value: '{base.color.blue.8}'},
'9': {$value: '{base.color.blue.9}'},
},
red: {
'0': {$value: '{base.color.orange.0}'},
'1': {$value: '{base.color.orange.1}'},
'2': {$value: '{base.color.orange.2}'},
'3': {$value: '{base.color.orange.3}'},
'4': {$value: '{base.color.orange.4}'},
'5': {$value: '{base.color.orange.5}'},
'6': {$value: '{base.color.orange.6}'},
'7': {$value: '{base.color.orange.7}'},
'8': {$value: '{base.color.orange.8}'},
'9': {$value: '{base.color.orange.9}'},
},
},
},
Expand Down
Loading

0 comments on commit 1142d90

Please sign in to comment.