Add an idea of lint packs #361
Annotations
2 errors and 8 warnings
src/LintDocs.test.ts > Docs have not changed:
packages/palette-lint/src/LintDocs.test.ts#L92
Error: Snapshot `Docs have not changed 1` mismatched
- Expected
+ Received
@@ -4,10 +4,11 @@
- [WCAG Contrast Graphical Objects](#wcag-contrast-graphical-objects)
- [WCAG Text Contrast: AA (text colors only)](#wcag-text-contrast--aa--text-colors-only-)
- [WCAG Text Contrast: AAA (text colors only)](#wcag-text-contrast--aaa--text-colors-only-)
- [WCAG Text Contrast: AA (all colors)](#wcag-text-contrast--aa--all-colors-)
+ - [WCAG Text Contrast: AAA (all colors)](#wcag-text-contrast--aaa--all-colors-)
- [Saturated not appropriate for serious affect](#saturated-not-appropriate-for-serious-affect)
- [Saturated not appropriate for trustworthy affect](#saturated-not-appropriate-for-trustworthy-affect)
- [Saturated not appropriate for calm affect](#saturated-not-appropriate-for-calm-affect)
- [Playful affects can have light blues, beiges, and grays](#playful-affects-can-have-light-blues--beiges--and-grays)
- [Dark reds and browns are not positive](#dark-reds-and-browns-are-not-positive)
@@ -169,25 +170,67 @@
### WCAG Text Contrast: AA (all colors)
**Tasks**: sequential, diverging, categorical
+
+
+ **Description**: All colors in a palette should have a sufficient contrast ratio with the background color. This is because if they are not, then they will not be differentiable from each other in some contexts. Valid algorithms are "APCA", "WCAG21", "Michelson", "Weber", "Lstar", "DeltaPhi".
+
+ **Natural Language**: ALL a IN colors SUCH THAT contrast(a, background, WCAG21) > 4.5
+
+ Palettes that will fail this test:
+
+ - #feed72, #f8f4d2, #eb717b with a #fff background
+
+
+
+ Palettes that will pass this test:
+ - #feed72, #f8f4d2, #af3b4b with a #fff background
+
+
+ **Program**:
- **Description**: All colors in a palette should have a sufficient contrast ratio with the background color. This is because if they are not, then they will not be differentiable from each other in some contexts. Valid algorithms are "APCA", "WCAG21", "Michelson", "Weber", "Lstar", "DeltaPhi". If this lint is not failing and you believe it should be, ensure that a color has been selected as having the "text" tag.
+ ```json
+ {
+ "$schema": "https://color-buddy-docs.netlify.app/lint-schema.v0.json",
+ "all": {
+ "in": "colors",
+ "varb": "a",
+ "predicate": {
+ ">": {
+ "left": { "contrast": {"left": "a", "right": "background"}, "algorithm": "WCAG21" },
+ "right": 4.5
+ }
+ }
+ }
+ }
+
+ ```
+
+
+
+
+ ### WCAG Text Contrast: AAA (all colors)
+ **Tasks**: sequential, diverging, categorical
+
+
+ **Description**: All colors in a palette should have a sufficient contrast ratio with the background color. This is because if they are not, then they will not be differentiable from each other in some contexts. Valid algorithms are "APCA", "WCAG21", "Michelson", "Weber", "Lstar", "DeltaPhi".
+
**Natural Language**: ALL a IN colors SUCH THAT contrast(a, background, WCAG21) > 4.5
Palettes that will fail this test:
- - #feed72, #f8f4d2, #eb717b (text) with a #fff background
+ - #feed72, #f8f4d2, #eb717b with a #fff background
Palettes that will pass this test:
- - #feed72, #f8f4d2, #af3b4b (text) with a #fff background
+ - #feed72, #f8f4d2, #af3b4b with a #fff background
**Program**:
```json
❯ src/LintDocs.test.ts:92:16
|
test-lib
Process completed with exit code 1.
|
test-lib
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
test-lib
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/[email protected]. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
test-lib
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test-lib
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test-app
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
test-app
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/[email protected]. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
test-app
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test-app
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|