From 6a119f81527b8075d83ed0c9b1b65a9f1366667d Mon Sep 17 00:00:00 2001 From: jasmussen Date: Wed, 9 Oct 2024 12:10:29 +0200 Subject: [PATCH 1/5] Storybook: Add stub doc on existing colors. --- storybook/stories/tokens/color.mdx | 104 +++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 storybook/stories/tokens/color.mdx diff --git a/storybook/stories/tokens/color.mdx b/storybook/stories/tokens/color.mdx new file mode 100644 index 00000000000000..556fcce041c111 --- /dev/null +++ b/storybook/stories/tokens/color.mdx @@ -0,0 +1,104 @@ +import { Meta, ColorPalette, ColorItem } from '@storybook/blocks'; + + + +# Color + +This document outlines the default color set of the WordPress component system as it ships. The page is a work in progress. + + +## Gray Tones + + + + + + + + + + + + + + + + +## Other + + + + + + + + + From 582885c1d37cab213f98996208f107d8dd12584e Mon Sep 17 00:00:00 2001 From: jasmussen Date: Wed, 9 Oct 2024 13:39:49 +0200 Subject: [PATCH 2/5] Update 4.6 to 4.5 for contrast. --- storybook/stories/tokens/color.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storybook/stories/tokens/color.mdx b/storybook/stories/tokens/color.mdx index 556fcce041c111..c864ce6c86774d 100644 --- a/storybook/stories/tokens/color.mdx +++ b/storybook/stories/tokens/color.mdx @@ -33,7 +33,7 @@ This document outlines the default color set of the WordPress component system a /> Date: Wed, 9 Oct 2024 15:20:11 +0200 Subject: [PATCH 3/5] Update based on feedback. --- storybook/stories/tokens/color.mdx | 72 +++++------------------------- 1 file changed, 10 insertions(+), 62 deletions(-) diff --git a/storybook/stories/tokens/color.mdx b/storybook/stories/tokens/color.mdx index c864ce6c86774d..5cf518a6f22375 100644 --- a/storybook/stories/tokens/color.mdx +++ b/storybook/stories/tokens/color.mdx @@ -6,86 +6,27 @@ import { Meta, ColorPalette, ColorItem } from '@storybook/blocks'; This document outlines the default color set of the WordPress component system as it ships. The page is a work in progress. - -## Gray Tones +## Colors - - - - - - - - - - - -## Other - +## Contrast +Ensure proper contrast is met between text, icons, UI, and backgrounds. Text needs to meet a 4.5:1 ratio to meet AA standards, while large text (16px+) and UI elements (borders, etc.) need to meet a 3:1 ratio. In this section is a list of tokens you can use to meet these criteria. +Against a white background: +* **Gray 700**\ +Lightest gray you can use and meet 4.5:1 text contrast. +* **Gray 600**\ +Lightest gray you can use and meet 3:1 UI contrast. From e5fb1709cf7e3ce77d13f141b58b1c3c78601f17 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Wed, 9 Oct 2024 15:24:33 +0200 Subject: [PATCH 4/5] Use SCSS also for the alerts. --- storybook/stories/tokens/color.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storybook/stories/tokens/color.mdx b/storybook/stories/tokens/color.mdx index 5cf518a6f22375..de306f42ef27d3 100644 --- a/storybook/stories/tokens/color.mdx +++ b/storybook/stories/tokens/color.mdx @@ -32,9 +32,9 @@ This document outlines the default color set of the WordPress component system a title="Alert colors" subtitle="" colors={{ - 'Alert Yellow': '#f0b849', - 'Alert Red': '#cc1818', - 'Alert Green': '#4ab866', + '$alert-yellow': '#f0b849', + '$alert-red': '#cc1818', + '$alert-green': '#4ab866', }} /> From 084c8e88d43cffb10d75504d95d942958a164b0b Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 10 Oct 2024 08:40:10 +0200 Subject: [PATCH 5/5] Separate white and black. --- storybook/stories/tokens/color.mdx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/storybook/stories/tokens/color.mdx b/storybook/stories/tokens/color.mdx index de306f42ef27d3..17944a47777fc8 100644 --- a/storybook/stories/tokens/color.mdx +++ b/storybook/stories/tokens/color.mdx @@ -10,10 +10,20 @@ This document outlines the default color set of the WordPress component system a + + + +