@workday/canvas-kit-mcp 15.0.0-alpha.0051-next.0 → 15.0.0-alpha.0060-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,116 @@
1
+ # Color Contrast
2
+
3
+ Color pairings should pass contrast requirements to ensure content is readable for everyone. Colors
4
+ in the palette are built with contrast baked in to make it simple to create accessible color
5
+ combinations.
6
+
7
+ Canvas believes that designing for accessible experience benefits everyone. Improved contrast
8
+ improves readability in bright sunlight, low-quality displays, and for users experiencing temporary
9
+ vision impairment. Using the color system can help reduce the guesswork in choosing colors and
10
+ ensure contrast ratios when applied.
11
+
12
+ ## Understanding Contrast
13
+
14
+ Contrast measures the difference in brightness between two colors, ensuring that content is
15
+ perceivable and readable against backgrounds. WCAG 2.1 guidelines specify a minimum contrast ratio
16
+ of 4.5:1 for text, 3:1 for interactive elements, and 7:1 for high contrast. The
17
+ [global palette](/guidelines/color/color-palette) and [tonal scale](/guidelines/color/color-scale)
18
+ are designed with target contrast ratios baked in, making it straightforward to achieve compliant
19
+ color combinations without a separate calculator.
20
+
21
+ ![Color contrast demonstration showing different step differences and their compliance levels](color-contrast-overview.png)
22
+
23
+ ![Text examples showing AA compliance (4.5:1) with black text on light gray, and AAA compliance (7:1) with white text on dark blue backgrounds](color-contrast-text-on-white.png)
24
+
25
+ ## Usage Guidance
26
+
27
+ 1. **Use [color roles](/guidelines/color/color-roles)** to guarantee accessibility through design
28
+ tokens.
29
+ 2. **Use the contrast framework**: If you need to choose colors from directly from the palette, make
30
+ sure to choose accessible color combinations. Use the
31
+ [contrast framework](#accessible-color-combinations) to make it easy to select accessible pairs
32
+ just from the step number.
33
+ 3. **Check your designs** against color-blindness and low-vision simulators to get a feel for what
34
+ your design might look like in different scenarios.
35
+ 4. **Avoid the use of color alone** to communicate information.
36
+
37
+ ![Color role examples showing bg-primary and text-primary automatically maintaining proper contrast ratios across light and dark themes](color-contrast-color-blind.png)
38
+
39
+ ## Accessible Color Combinations
40
+
41
+ Colors are graded using a 15 step tonal scale. Each step is assigned to a number that represents the
42
+ lightness of that color relative to other colors in the scale. For example, 0 is the lightest color
43
+ in the scale (white), and 1000 is the darkest color (black). A 500 color would have a lightness
44
+ value between the two, with lighter and darker variations on both sides. To determine if a color
45
+ will pass contrast, compare step numbers and the difference between the two.
46
+
47
+ Regular text requires a 500+ step difference to achieve the 4.5:1 ratio needed for AA compliance.
48
+ For enhanced accessibility, text can use a 700+ step difference to achieve the 7:1 ratio that
49
+ exceeds AAA compliance standards. For non-text contrast, a 400+ step difference is needed (if both
50
+ colors have step numbers greater than 200+|)
51
+
52
+ ### Overview
53
+
54
+ | **Content** | **WCAG Level** | **Target Ratio** | **Step Difference** | **Example** |
55
+ | ------------ | -------------- | ---------------- | ------------------- | -------------------------- |
56
+ | **Text** | AA | 4.5:1 | 500+ | `slate-100` on `slate-600` |
57
+ | **Text** | AAA | 7:1 | 700+ | `slate-100` on `slate-800` |
58
+ | **Non-text** | AA | 3:1 | 400+ (>200) | `blue-600` on `blue-100` |
59
+ | **Non-text** | AAA | 4.5:1 | 500+ | `blue-100` on `blue-600` |
60
+
61
+ ### Text Contrast
62
+
63
+ Normal sized text should have at least at 4.5:1 contrast to meet Level AA compliance. A difference
64
+ of 500 or more between steps guarentees it passes text contrast guidelines.
65
+
66
+ ![Step difference examples showing 500+ differences guarantee 4.5:1 text contrast across various background and text color combinations](color-contrast-text-between.png)
67
+
68
+ | **Background** | **Foreground Step** | **Step Difference** | **Compliance Level** |
69
+ | -------------- | ------------------- | ------------------- | -------------------- |
70
+ | 0(white) | 600 | 600 | AA Text |
71
+ | 100 | 600 | 500 | AA Text |
72
+ | 200 | 700 | 500 | AA Text |
73
+ | 300 | 800 | 500 | AA Text |
74
+ | 400 | 900 | 500 | AA Text |
75
+ | 500 | 1000 (black) | 500 | AA Text |
76
+
77
+ ### Non-text Contrast
78
+
79
+ Interactive elements and non-decorative visuals (icons) should have a contrast of 3:1 to meet Level
80
+ AA compliance.
81
+
82
+ A difference of 400 or more between steps guarantees a contrast of 3:1 for steps greater than 200.
83
+
84
+ ![Interactive elements showing buttons, form inputs, and icons meeting 3:1 contrast requirements with 400+ step differences](color-contrast-nontext-between.png)
85
+
86
+ | **Background** | **Foreground Step** | **Step Difference** | **Compliance Level** |
87
+ | -------------- | ------------------- | ------------------- | -------------------- |
88
+ | 0(white) | 500 | 500 | AA Non-text |
89
+ | 25 | 500 | 475 | AA Non-text |
90
+ | 200 | 600 | 400 | AA Non-text |
91
+ | 300 | 700 | 400 | AA Non-text |
92
+ | 400 | 800 | 400 | AA Non-text |
93
+ | 500 | 900 | 400 | AA Non-text |
94
+ | 600 | 1000 (black) | 400 | AA Non-text |
95
+
96
+ ### High Contrast (> 7:1)
97
+
98
+ Level AAA contrast should be targeted when you are designing for low vision or colorblindness. For
99
+ both text and non-text contrast, this means the target difference is increased (text increases to
100
+ 700+, non-text increases to 500+).
101
+
102
+ ![High contrast interface examples showing AAA compliance with 7:1+ ratios for enhanced accessibility and low vision support](color-contrast-nontext-on-white.png)
103
+
104
+ | **Background** | **AA Contrast** | **AAA Contrast** | **AA Difference** | **AAA Difference** |
105
+ | -------------- | --------------- | ---------------- | ----------------- | ------------------ |
106
+ | 0(white) | 700 | 500 | 700 | 500 |
107
+ | 100 | 800 | 600 | 700 | 500 |
108
+ | 200 | 900 | 700 | 700 | 500 |
109
+ | 300 | 1000 (black) | 800 | 700 | 500 |
110
+ | 400 | 1000 (black) | 900 | 600 | 500 |
111
+ | 500 | 0(white) | 0(white) | 500 | 500 |
112
+ | 600 | 0(white) | 0(white) | 600 | 600 |
113
+ | 700 | 0(white) | 100 | 700 | 600 |
114
+ | 800 | 100 | 200 | 700 | 600 |
115
+ | 900 | 200 | 300 | 700 | 600 |
116
+ | 1000 (black) | 300 | 400 | 700 | 600 |
@@ -0,0 +1,141 @@
1
+ # Color Palette
2
+
3
+ ## Global Palette
4
+
5
+ The Canvas palette is Workday's shared color palette meant for use across all products and
6
+ platforms. It includes 11 colors and 2 neutrals, each with 13 shades.
7
+
8
+ Colors are designed in the okLCH (lightness, chroma, hue) color space to feel perceptually balanced,
9
+ meaning that colors with the same step value appear similar in brightness. This uniformity makes
10
+ accessible contrast ratios more predictable between steps and helps create smooth transitions when
11
+ switching between different contexts, such as themes and modes.
12
+
13
+ The global palette extends Workday's brand colors to create functional tones and tints meant for use
14
+ in interface and product design. Colors are organized into color families ('blue', 'red', 'green')
15
+ and a tonal scale from lightest (0) to darkest (1000), with each step serving a specific role in the
16
+ interface.
17
+
18
+ Color scales follow a gradual progression in vibrancy, peaking at the midpoint, before decreasing
19
+ again. This progression creates softer surface colors at the tailends, and more vibrant accents in
20
+ the middle.
21
+
22
+ ### Accent Colors
23
+
24
+ Accent colors are saturated colors - like blue, red, orange, purple. Accent colors are used to draw
25
+ attention towards them and should be used sparingly, and for a specific purpose.
26
+
27
+ <Do>
28
+
29
+ - Use accent colors to highlight important information
30
+ - Use existing color roles to inform selection
31
+ - Use accent colors sparingly
32
+ - for important actions, alerts, or states
33
+
34
+ </Do>
35
+
36
+ <Dont>
37
+
38
+ - Avoid decorative use of accent colors
39
+ - Avoid applying accent colors to secondary or supporting content
40
+
41
+ </Dont>
42
+
43
+ ### Neutral Colors
44
+
45
+ Neutrals are greyscale colors, used for backgrounds, foregrounds, or as a base for alpha colors. The
46
+ palette includes 2 neutrals meant for different purposes.
47
+
48
+ - Slate is a tinted neutral built from Workday's brand blue. It's meant for secondary backgrounds,
49
+ borders, and text for subtle styling that pairs well with brand accents.
50
+ - Neutral is an achromatic greyscale with no hue or chroma, from white to black. It's meant for
51
+ consistent contrast against backgrounds, such as prose text.
52
+
53
+ <Do>
54
+
55
+ - Use Neutral for prose and structural content - Use Slate for secondary UI elements, borders, and
56
+ text
57
+
58
+ </Do>
59
+
60
+ <Dont>
61
+
62
+ - Use Neutral and Slate interchangeably
63
+
64
+ </Dont>
65
+
66
+ ### Alpha Colors
67
+
68
+ Alpha colors are colors with transparency that adaptive dynamically to background colors. This
69
+ creates a natural layering effect on the background without requiring new color definitions for each
70
+ background.
71
+
72
+ <Do>
73
+
74
+ - Use alpha colors when elements need to adapt to different backgrounds - Use alpha colors in a
75
+ consistent way throughout the experience - Ensure sufficient contrast for underlying content
76
+
77
+ </Do>
78
+
79
+ ## Brand Palette
80
+
81
+ Brand colors represent Workday's core brand and identity. Reserve use for brand moments, marketing
82
+ materials, and other use cases specific to the Workday brand.
83
+
84
+ For more information, see
85
+ [Workday's brand guidelines](https://brand.workday.com/document/89#/-/workday-brand-guide).
86
+
87
+ ## Product Palette
88
+
89
+ The product palette is a subset of the global palette meant for use when designing Workday features
90
+ and interfaces. Colors in the product palette are assigned
91
+ [color roles](/guidelines/color/color-roles) through the use of
92
+ [design tokens](/styles/tokens/color).
93
+
94
+ ### Color Roles
95
+
96
+ Color roles assign a purpose to colors in the palette, specifying when and how to use that color.
97
+ When building Workday interfaces, use system design tokens to ensure that color roles are
98
+ consistently applied throughout the admin. For example, the `positive` color role is used to
99
+ indicate success and task completion.
100
+
101
+ To learn more about color roles, see [Color Roles](/guidelines/color/color-roles).
102
+
103
+ ### Design Tokens
104
+
105
+ Design tokens represent a design decision as structured data. Tokens store visual properties like
106
+ color and spacing in a platform-agnostic format, such as JSON. Those decisions are then transformed
107
+ into platform specific pacakges in a format ready to be consumed by each platform.
108
+
109
+ Defining colors as tokens removes the need to redefine colors for each platform. Instead, colors are
110
+ defined in a single location and distributed to each platform, enabling more consistent,
111
+ maintainable, and systemic change over time.
112
+
113
+ #### Base Tokens
114
+
115
+ Base tokens are static colors whose values do not change. All colors in the
116
+ [global palette](#global-palette) are represented as base tokens. Base colors are organized using a
117
+ tonal scale, from lightest to darkest.
118
+
119
+ #### Brand Tokens
120
+
121
+ Brand tokens are used to enable brand/tenant level theming. This means that colors are subject to
122
+ change depending on the customer's brand.
123
+
124
+ They are not connected to system tokens, which are meant for application-wide use.
125
+
126
+ For a full list of brand tokens, see [Brand Tokens](/styles/tokens/color#brand-color-tokens).
127
+
128
+ #### System Tokens
129
+
130
+ System tokens applies a role to a color. For example, `sys.color.bg.critical.default` can be read as
131
+ "the default background color for critical elements".
132
+
133
+ System colors are mapped to Base colors. For example, `sys.color.bg.critical.default` is mapped to
134
+ `base.palette.red.600`. This is how theming is applied. Creating a new theme means that the value of
135
+ the system color is swapping with another color.
136
+
137
+ Approaching color this way makes the process part of a larger system instead of an isolated choice.
138
+ Instead of asking "what color should this be?", the question becomes "what role does this element
139
+ play in the interface?".
140
+
141
+ For a full list of system tokens, see [System Tokens](/styles/tokens/color#system-color-tokens).