From 4dc8e2ea3725c32fcf3b5a7cfc0cf29d943e2169 Mon Sep 17 00:00:00 2001 From: adrian5 Date: Thu, 21 Jul 2022 03:55:08 +0200 Subject: [PATCH] Normalize color data to lowercase hex (#338) * Normalize color data to lowercase hex * Create ninety-goats-glow.md Co-authored-by: simurai --- .changeset/ninety-goats-glow.md | 5 +++++ data/colors/themes/dark.ts | 16 ++++++++-------- data/colors/themes/dark_colorblind.ts | 2 +- data/colors/themes/dark_dimmed.ts | 22 +++++++++++----------- data/colors/themes/dark_high_contrast.ts | 20 ++++++++++---------- data/colors/themes/dark_tritanopia.ts | 2 +- data/colors/themes/light.ts | 18 +++++++++--------- data/colors/themes/light_colorblind.ts | 2 +- data/colors/themes/light_high_contrast.ts | 20 ++++++++++---------- data/colors/themes/light_tritanopia.ts | 6 +++--- data/colors/vars/app_light.ts | 8 ++++---- 11 files changed, 63 insertions(+), 58 deletions(-) create mode 100644 .changeset/ninety-goats-glow.md diff --git a/.changeset/ninety-goats-glow.md b/.changeset/ninety-goats-glow.md new file mode 100644 index 000000000..ad1ade05c --- /dev/null +++ b/.changeset/ninety-goats-glow.md @@ -0,0 +1,5 @@ +--- +"@primer/primitives": patch +--- + +Normalize color data to lowercase hex diff --git a/data/colors/themes/dark.ts b/data/colors/themes/dark.ts index e01175e98..06235c0c9 100644 --- a/data/colors/themes/dark.ts +++ b/data/colors/themes/dark.ts @@ -50,15 +50,15 @@ const scale = { ], pink: ['#ffdaec', '#ffbedd', '#ff9bce', '#f778ba', '#db61a2', '#bf4b8a', '#9e3670', '#7d2457', '#5e103e', '#42062a'], coral: [ - '#FFDDD2', - '#FFC2B2', - '#FFA28B', - '#F78166', - '#EA6045', - '#CF462D', - '#AC3220', + '#ffddd2', + '#ffc2b2', + '#ffa28b', + '#f78166', + '#ea6045', + '#cf462d', + '#ac3220', '#872012', - '#640D04', + '#640d04', '#460701' ] } diff --git a/data/colors/themes/dark_colorblind.ts b/data/colors/themes/dark_colorblind.ts index f926015c5..2184fc8ba 100644 --- a/data/colors/themes/dark_colorblind.ts +++ b/data/colors/themes/dark_colorblind.ts @@ -56,7 +56,7 @@ const scale = { '#271052' ], pink: ['#ffdaec', '#ffbedd', '#ff9bce', '#f778ba', '#db61a2', '#bf4b8a', '#9e3670', '#7d2457', '#5e103e', '#42062a'], - coral: ['#FFDDD2', '#FFC2B2', '#FFA28B', '#F78166', '#EA6045', '#CF462D', '#AC3220', '#872012', '#640D04', '#460701'] + coral: ['#ffddd2', '#ffc2b2', '#ffa28b', '#f78166', '#ea6045', '#cf462d', '#ac3220', '#872012', '#640d04', '#460701'] } const exceptions = { diff --git a/data/colors/themes/dark_dimmed.ts b/data/colors/themes/dark_dimmed.ts index ea22ffea5..4301c1fea 100644 --- a/data/colors/themes/dark_dimmed.ts +++ b/data/colors/themes/dark_dimmed.ts @@ -31,7 +31,7 @@ const scale = { '#682d0f', '#4d210c' ], - red: ['#ffd8d3', '#ffb8b0', '#ff938a', '#f47067', '#e5534b', '#c93c37', '#ad2e2c', '#922323', '#78191b', '#5D0F12'], + red: ['#ffd8d3', '#ffb8b0', '#ff938a', '#f47067', '#e5534b', '#c93c37', '#ad2e2c', '#922323', '#78191b', '#5d0f12'], purple: [ '#eedcff', '#dcbdfb', @@ -46,16 +46,16 @@ const scale = { ], pink: ['#ffd7eb', '#ffb3d8', '#fc8dc7', '#e275ad', '#c96198', '#ae4c82', '#983b6e', '#7e325a', '#69264a', '#551639'], coral: [ - '#FFDACF', - '#FFB9A5', - '#F79981', - '#EC775C', - '#DE5B41', - '#C2442D', - '#A93524', - '#8D291B', - '#771D13', - '#5D1008' + '#ffdacf', + '#ffb9a5', + '#f79981', + '#ec775c', + '#de5b41', + '#c2442d', + '#a93524', + '#8d291b', + '#771d13', + '#5d1008' ] } diff --git a/data/colors/themes/dark_high_contrast.ts b/data/colors/themes/dark_high_contrast.ts index 02dacdb78..a4e20c23e 100644 --- a/data/colors/themes/dark_high_contrast.ts +++ b/data/colors/themes/dark_high_contrast.ts @@ -101,16 +101,16 @@ const scale = { '#9c1d6a' ], coral: [ - '#FFDED4', - '#FFCBB9', - '#FFB39B', - '#FF967D', - '#FC704F', - '#FC704F', - '#F75133', - '#E03B21', - '#C62612', - '#A91500' + '#ffded4', + '#ffcbb9', + '#ffb39b', + '#ff967d', + '#fc704f', + '#fc704f', + '#f75133', + '#e03b21', + '#c62612', + '#a91500' ] } diff --git a/data/colors/themes/dark_tritanopia.ts b/data/colors/themes/dark_tritanopia.ts index d4d5f1453..e659f547d 100644 --- a/data/colors/themes/dark_tritanopia.ts +++ b/data/colors/themes/dark_tritanopia.ts @@ -56,7 +56,7 @@ const scale = { '#271052' ], pink: ['#ffdaec', '#ffbedd', '#ff9bce', '#f778ba', '#db61a2', '#bf4b8a', '#9e3670', '#7d2457', '#5e103e', '#42062a'], - coral: ['#FFDDD2', '#FFC2B2', '#FFA28B', '#F78166', '#EA6045', '#CF462D', '#AC3220', '#872012', '#640D04', '#460701'] + coral: ['#ffddd2', '#ffc2b2', '#ffa28b', '#f78166', '#ea6045', '#cf462d', '#ac3220', '#872012', '#640d04', '#460701'] } export default merge(dark_colorblind, {scale}) diff --git a/data/colors/themes/light.ts b/data/colors/themes/light.ts index 9decf5050..f03fca99c 100644 --- a/data/colors/themes/light.ts +++ b/data/colors/themes/light.ts @@ -35,7 +35,7 @@ const scale = { '#5c2200', '#471700' ], - red: ['#FFEBE9', '#ffcecb', '#ffaba8', '#ff8182', '#fa4549', '#cf222e', '#a40e26', '#82071e', '#660018', '#4c0014'], + red: ['#ffebe9', '#ffcecb', '#ffaba8', '#ff8182', '#fa4549', '#cf222e', '#a40e26', '#82071e', '#660018', '#4c0014'], purple: [ '#fbefff', '#ecd8ff', @@ -50,14 +50,14 @@ const scale = { ], pink: ['#ffeff7', '#ffd3eb', '#ffadda', '#ff80c8', '#e85aad', '#bf3989', '#99286e', '#772057', '#611347', '#4d0336'], coral: [ - '#FFF0EB', - '#FFD6CC', - '#FFB4A1', - '#FD8C73', - '#EC6547', - '#C4432B', - '#9E2F1C', - '#801F0F', + '#fff0eb', + '#ffd6cc', + '#ffb4a1', + '#fd8c73', + '#ec6547', + '#c4432b', + '#9e2f1c', + '#801f0f', '#691105', '#510901' ] diff --git a/data/colors/themes/light_colorblind.ts b/data/colors/themes/light_colorblind.ts index 44ade9f4c..a6311a42b 100644 --- a/data/colors/themes/light_colorblind.ts +++ b/data/colors/themes/light_colorblind.ts @@ -56,7 +56,7 @@ const scale = { '#2e1461' ], pink: ['#ffeff7', '#ffd3eb', '#ffadda', '#ff80c8', '#e85aad', '#bf3989', '#99286e', '#772057', '#611347', '#4d0336'], - coral: ['#FFF0EB', '#FFD6CC', '#FFB4A1', '#FD8C73', '#EC6547', '#C4432B', '#9E2F1C', '#801F0F', '#691105', '#510901'] + coral: ['#fff0eb', '#ffd6cc', '#ffb4a1', '#fd8c73', '#ec6547', '#c4432b', '#9e2f1c', '#801f0f', '#691105', '#510901'] } const exceptions = { diff --git a/data/colors/themes/light_high_contrast.ts b/data/colors/themes/light_high_contrast.ts index ab9eceacb..55e784f79 100644 --- a/data/colors/themes/light_high_contrast.ts +++ b/data/colors/themes/light_high_contrast.ts @@ -5,16 +5,16 @@ const scale = { black: '#010409', white: '#ffffff', gray: [ - '#FFFFFF', - '#E7ECF0', - '#CED5DC', - '#ACB6C0', - '#88929D', - '#66707B', - '#4B535D', - '#343B43', - '#20252C', - '#0E1116' + '#ffffff', + '#e7ecf0', + '#ced5dc', + '#acb6c0', + '#88929d', + '#66707b', + '#4b535d', + '#343b43', + '#20252c', + '#0e1116' ], blue: [ '#dff7ff', diff --git a/data/colors/themes/light_tritanopia.ts b/data/colors/themes/light_tritanopia.ts index d1e97ca39..64956d0a5 100644 --- a/data/colors/themes/light_tritanopia.ts +++ b/data/colors/themes/light_tritanopia.ts @@ -20,7 +20,7 @@ const scale = { '#3b2300' ], orange: [ - '#FFEBE9', + '#ffebe9', '#ffcecb', '#ffaba8', '#ff8182', @@ -32,7 +32,7 @@ const scale = { '#4c0014' ], red: [ - '#FFEBE9', + '#ffebe9', '#ffcecb', '#ffaba8', '#ff8182', @@ -56,7 +56,7 @@ const scale = { '#2e1461' ], pink: ['#ffeff7', '#ffd3eb', '#ffadda', '#ff80c8', '#e85aad', '#bf3989', '#99286e', '#772057', '#611347', '#4d0336'], - coral: ['#FFF0EB', '#FFD6CC', '#FFB4A1', '#FD8C73', '#EC6547', '#C4432B', '#9E2F1C', '#801F0F', '#691105', '#510901'] + coral: ['#fff0eb', '#ffd6cc', '#ffb4a1', '#fd8c73', '#ec6547', '#c4432b', '#9e2f1c', '#801f0f', '#691105', '#510901'] } export default merge(light_colorblind, {scale}) diff --git a/data/colors/vars/app_light.ts b/data/colors/vars/app_light.ts index f6624766f..58859fc99 100644 --- a/data/colors/vars/app_light.ts +++ b/data/colors/vars/app_light.ts @@ -13,14 +13,14 @@ export default { addition: { numText: get('fg.default'), fg: get('fg.default'), - numBg: '#CCFFD8', - lineBg: '#E6FFEC', - wordBg: '#ABF2BC' + numBg: '#ccffd8', + lineBg: '#e6ffec', + wordBg: '#abf2bc' }, deletion: { numText: get('fg.default'), fg: get('fg.default'), - numBg: '#FFD7D5', + numBg: '#ffd7d5', lineBg: get('danger.subtle'), wordBg: get('danger.muted') },