@uselazuli/cli 0.0.0-stage → 1.0.1

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.
Files changed (179) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/LICENSE +21 -0
  3. package/README.md +202 -2
  4. package/agents/lazuli-design-reviewer.md +30 -0
  5. package/agents/lazuli-first-look.md +22 -0
  6. package/agents/lazuli-task-tester.md +25 -0
  7. package/bin/lazuli.mjs +699 -0
  8. package/package.json +11 -4
  9. package/rules/accessibility/HYPOTHESES.md +8 -0
  10. package/rules/accessibility/_area.yaml +7 -0
  11. package/rules/accessibility/operable.yaml +100 -0
  12. package/rules/accessibility/perceivable.yaml +153 -0
  13. package/rules/accessibility/robust.yaml +24 -0
  14. package/rules/accessibility/understandable.yaml +72 -0
  15. package/rules/color/HYPOTHESES.md +27 -0
  16. package/rules/color/_area.yaml +10 -0
  17. package/rules/color/adapt.yaml +183 -0
  18. package/rules/color/create.yaml +259 -0
  19. package/rules/color/review.yaml +215 -0
  20. package/rules/color/signal.yaml +196 -0
  21. package/rules/content/HYPOTHESES.md +18 -0
  22. package/rules/content/_area.yaml +8 -0
  23. package/rules/content/review.yaml +347 -0
  24. package/rules/content/voice.yaml +144 -0
  25. package/rules/content/writing.yaml +202 -0
  26. package/rules/data/HYPOTHESES.md +11 -0
  27. package/rules/data/_area.yaml +7 -0
  28. package/rules/data/charts.yaml +189 -0
  29. package/rules/data/dashboards.yaml +141 -0
  30. package/rules/data/review.yaml +159 -0
  31. package/rules/graphic/HYPOTHESES.md +17 -0
  32. package/rules/graphic/_area.yaml +8 -0
  33. package/rules/graphic/identity.yaml +141 -0
  34. package/rules/graphic/pieces.yaml +164 -0
  35. package/rules/graphic/review.yaml +242 -0
  36. package/rules/graphic/symbol.yaml +141 -0
  37. package/rules/motion/HYPOTHESES.md +19 -0
  38. package/rules/motion/_area.yaml +7 -0
  39. package/rules/motion/micro.yaml +143 -0
  40. package/rules/motion/review.yaml +347 -0
  41. package/rules/motion/transitions.yaml +169 -0
  42. package/rules/typography/HYPOTHESES.md +12 -0
  43. package/rules/typography/_area.yaml +8 -0
  44. package/rules/typography/adapt.yaml +45 -0
  45. package/rules/typography/create.yaml +126 -0
  46. package/rules/typography/review.yaml +127 -0
  47. package/rules/ui/HYPOTHESES.md +23 -0
  48. package/rules/ui/_area.yaml +9 -0
  49. package/rules/ui/compose.yaml +219 -0
  50. package/rules/ui/grid.yaml +75 -0
  51. package/rules/ui/review.yaml +399 -0
  52. package/rules/ui/states.yaml +257 -0
  53. package/rules/ux/HYPOTHESES.md +13 -0
  54. package/rules/ux/_area.yaml +8 -0
  55. package/rules/ux/flows.yaml +164 -0
  56. package/rules/ux/forms.yaml +142 -0
  57. package/rules/ux/review.yaml +186 -0
  58. package/skills/lazuli/SKILL.md +180 -0
  59. package/skills/lazuli/procedures/create.md +29 -0
  60. package/skills/lazuli/procedures/explain-decisions.md +22 -0
  61. package/skills/lazuli/procedures/improve.md +30 -0
  62. package/skills/lazuli/procedures/remember-this.md +41 -0
  63. package/skills/lazuli/procedures/review-design.md +35 -0
  64. package/skills/lazuli/procedures/show-options.md +32 -0
  65. package/skills/lazuli-accessibility-check/SKILL.md +68 -0
  66. package/skills/lazuli-color-context-and-culture/SKILL.md +53 -0
  67. package/skills/lazuli-color-context-and-culture/references/sectors.md +26 -0
  68. package/skills/lazuli-color-palette-by-intent/SKILL.md +54 -0
  69. package/skills/lazuli-color-palette-by-intent/references/intent-chords.md +51 -0
  70. package/skills/lazuli-color-screen-review/SKILL.md +51 -0
  71. package/skills/lazuli-color-states-and-signals/SKILL.md +53 -0
  72. package/skills/lazuli-content-interface-writing/SKILL.md +53 -0
  73. package/skills/lazuli-content-voice/SKILL.md +39 -0
  74. package/skills/lazuli-data-charts-and-dashboards/SKILL.md +59 -0
  75. package/skills/lazuli-graphic-derived-pieces/SKILL.md +40 -0
  76. package/skills/lazuli-graphic-derived-pieces/references/piece-template.html +24 -0
  77. package/skills/lazuli-graphic-identity/SKILL.md +43 -0
  78. package/skills/lazuli-motion-micro-and-transitions/SKILL.md +49 -0
  79. package/skills/lazuli-typography-choose-and-pair/SKILL.md +50 -0
  80. package/skills/lazuli-typography-screen-review/SKILL.md +51 -0
  81. package/skills/lazuli-ui-composition/SKILL.md +42 -0
  82. package/skills/lazuli-ui-composition/references/option-template.html +34 -0
  83. package/skills/lazuli-ui-layout-review/SKILL.md +47 -0
  84. package/skills/lazuli-ui-states-and-system/SKILL.md +54 -0
  85. package/skills/lazuli-ux-flows-and-forms/SKILL.md +51 -0
  86. package/skills/lazuli-ux-task-test/SKILL.md +44 -0
  87. package/src/browser.mjs +161 -0
  88. package/src/commands/capture.mjs +313 -0
  89. package/src/commands/catalog.mjs +37 -0
  90. package/src/commands/check-design.mjs +428 -0
  91. package/src/commands/check-goals.mjs +57 -0
  92. package/src/commands/compare-designs.mjs +97 -0
  93. package/src/commands/draft-memo.mjs +161 -0
  94. package/src/commands/hooks.mjs +343 -0
  95. package/src/commands/install-hooks.mjs +120 -0
  96. package/src/commands/install.mjs +132 -0
  97. package/src/commands/list-rules.mjs +49 -0
  98. package/src/commands/map-page.mjs +594 -0
  99. package/src/commands/record-answers.mjs +79 -0
  100. package/src/commands/record-log.mjs +296 -0
  101. package/src/commands/record-task.mjs +250 -0
  102. package/src/commands/render-options.mjs +164 -0
  103. package/src/commands/start-project.mjs +32 -0
  104. package/src/measure/a11y.mjs +383 -0
  105. package/src/measure/asset.mjs +206 -0
  106. package/src/measure/at-rest.mjs +49 -0
  107. package/src/measure/cases.mjs +549 -0
  108. package/src/measure/chart-read.mjs +401 -0
  109. package/src/measure/chart.mjs +264 -0
  110. package/src/measure/coherence.mjs +145 -0
  111. package/src/measure/color.mjs +79 -0
  112. package/src/measure/content.mjs +82 -0
  113. package/src/measure/cvd.mjs +24 -0
  114. package/src/measure/extreme.mjs +241 -0
  115. package/src/measure/forms.mjs +150 -0
  116. package/src/measure/in-page/a11y.js +489 -0
  117. package/src/measure/in-page/color.js +346 -0
  118. package/src/measure/in-page/composition.js +1496 -0
  119. package/src/measure/in-page/contrast.js +15 -0
  120. package/src/measure/in-page/cvd.js +173 -0
  121. package/src/measure/in-page/extreme.js +355 -0
  122. package/src/measure/in-page/frames.js +781 -0
  123. package/src/measure/in-page/look.js +28 -0
  124. package/src/measure/in-page/motion-probe.js +169 -0
  125. package/src/measure/in-page/style.js +107 -0
  126. package/src/measure/in-page/svg-strokes.js +112 -0
  127. package/src/measure/in-page/svg-uses.js +50 -0
  128. package/src/measure/in-page/symbol.js +123 -0
  129. package/src/measure/in-page/type.js +266 -0
  130. package/src/measure/in-page/weight.js +207 -0
  131. package/src/measure/layout.mjs +91 -0
  132. package/src/measure/motion.mjs +508 -0
  133. package/src/measure/piece.mjs +195 -0
  134. package/src/measure/registry.mjs +252 -0
  135. package/src/measure/rhythm.mjs +81 -0
  136. package/src/measure/signature.mjs +65 -0
  137. package/src/measure/states.mjs +240 -0
  138. package/src/measure/style.mjs +13 -0
  139. package/src/measure/symbol.mjs +268 -0
  140. package/src/measure/terms.mjs +153 -0
  141. package/src/measure/tiles.mjs +20 -0
  142. package/src/measure/timeline.mjs +621 -0
  143. package/src/measure/type.mjs +167 -0
  144. package/src/measure/weight.mjs +18 -0
  145. package/src/private-strings.mjs +81 -0
  146. package/src/project/blind.mjs +70 -0
  147. package/src/project/edits.mjs +154 -0
  148. package/src/project/gate.mjs +159 -0
  149. package/src/project/lazuli-md.mjs +497 -0
  150. package/src/project/log.mjs +329 -0
  151. package/src/project/match.mjs +112 -0
  152. package/src/project/records.mjs +380 -0
  153. package/src/project/tasks.mjs +153 -0
  154. package/src/report/evaluate.mjs +27 -0
  155. package/src/report/evaluators/a11y.mjs +206 -0
  156. package/src/report/evaluators/chart.mjs +151 -0
  157. package/src/report/evaluators/coherence.mjs +103 -0
  158. package/src/report/evaluators/color.mjs +86 -0
  159. package/src/report/evaluators/content.mjs +112 -0
  160. package/src/report/evaluators/extreme.mjs +53 -0
  161. package/src/report/evaluators/forms.mjs +116 -0
  162. package/src/report/evaluators/layout.mjs +94 -0
  163. package/src/report/evaluators/motion.mjs +273 -0
  164. package/src/report/evaluators/piece.mjs +69 -0
  165. package/src/report/evaluators/rhythm.mjs +99 -0
  166. package/src/report/evaluators/states.mjs +39 -0
  167. package/src/report/evaluators/style.mjs +35 -0
  168. package/src/report/evaluators/symbol.mjs +110 -0
  169. package/src/report/evaluators/terms.mjs +49 -0
  170. package/src/report/evaluators/type.mjs +163 -0
  171. package/src/report/evaluators/weight.mjs +51 -0
  172. package/src/report/evidence.mjs +4 -0
  173. package/src/report/finding.mjs +11 -0
  174. package/src/report/format.mjs +215 -0
  175. package/src/rules/hypotheses.mjs +28 -0
  176. package/src/rules/load.mjs +256 -0
  177. package/src/rules/public-text.mjs +56 -0
  178. package/src/rules/schema.mjs +212 -0
  179. package/templates/LAZULI.md +86 -0
package/package.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "@uselazuli/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.1",
4
+ "type": "module",
5
+ "bin": { "lazuli": "bin/lazuli.mjs" },
6
+ "files": ["bin/", "src/", "rules/", "skills/", "agents/", "templates/", "CHANGELOG.md"],
7
+ "engines": { "node": ">=22.1" },
8
+ "scripts": { "test": "node --test \"tests/**/*.test.mjs\"", "smoke": "node scripts/smoke-real-sites.mjs" },
9
+ "dependencies": { "playwright-core": "^1.65.1", "yaml": "^2.9.1" },
10
+ "repository": { "type": "git", "url": "git+https://github.com/uselazuli/lazuli.git" },
11
+ "license": "MIT",
12
+ "publishConfig": { "access": "public" }
13
+ }
@@ -0,0 +1,8 @@
1
+ # Accessibility hypotheses to validate
2
+
3
+ Only what is not from WCAG 2.2 lives here. The numbers of the norm rules (320, 24, the text spacing multipliers) are in the rules with their success criteria and are not hypotheses. Findings from these rules are hints, never verdicts.
4
+
5
+ | ID | Principle | Candidate limit | How to validate |
6
+ |---|---|---|---|
7
+ | H1 | AU2 (link text) | A link whose whole accessible name is one of these phrases, in English and Portuguese, is flagged: click here, here, this link, read more, learn more, more, more info, more information, details, clique aqui, aqui, este link, leia mais, saiba mais, ver mais, mais, mais informações, mais informacoes, detalhes. The list is our claim, WCAG 2.4.4 names no phrases and accepts generic text when its context gives the purpose | Open the screen reader's list of links on pages with and without these phrases and ask people who use one whether they can tell where each link goes. Review the shortest entries ("more", "mais") first, since they are the likeliest to match a legitimate link name. Drop phrases nobody finds confusing and add the ones they do |
8
+ | H2 | AP6 (large images are not all marked decorative) | Cutoff: minSidePx 120. How it was picked: carried over, not picked from a site: it is the kit's existing definition of icon-sized, the chart measurer's MIN_CHART_SIDE_PX (an svg or canvas smaller than 120 px on either side is an icon or a sparkline, not a chart), set before any page was measured. What is counted: visible img elements whose rendered width and height are both at least 120 px, and whether each is marked decorative (alt="", role presentation or none, or inside aria-hidden). Limits: a large image can be decoration and a small one can carry content; background images, svg and canvas are not read; the hint says only that every large image is decorative, not which one carries content. Observed so far, not evidence: decorative-photos.html at 1000 px, 5 large images all decorative (hint), icons of 24 px and a 100 px thumbnail not counted. | Needs pages whose large images were sorted by people into content and decoration, checked against the cutoff before it is applied; then compare neighboring cutoffs on how many content images each catches and how many decorative ones it asks about |
@@ -0,0 +1,7 @@
1
+ area: accessibility
2
+ title: Accessibility
3
+ summary: WCAG 2.2 checks that run with every other area.
4
+ order: 30
5
+ prefixes: [AP, AO, AU, AR]
6
+ skills:
7
+ - lazuli-accessibility-check
@@ -0,0 +1,100 @@
1
+ - id: AO1
2
+ name: Keyboard focus is visible
3
+ area: accessibility
4
+ moment: check
5
+ skill: lazuli-accessibility-check
6
+ rule: >-
7
+ Give every element that can take keyboard focus a visible focus indicator. Do not remove the outline without putting a clearly visible one in its place.
8
+ why: >-
9
+ A keyboard user finds their place by the focus indicator. When it disappears, the person cannot tell what Enter or Space will act on.
10
+ origin: norm
11
+ status: active
12
+ source: >-
13
+ WCAG 2.2, success criterion 2.4.7 Focus Visible (level AA). Opened 2026-11-25: https://www.w3.org/TR/WCAG22/
14
+ measure: a11y.focus-visible
15
+ when_to_break: >-
16
+ The norm has no exemption for a missing indicator, and a declared break never waives it. What a designer can vary is how the indicator looks: an outline, a ring, an underline, a color or background change, as long as the change is visible when the element is focused with the keyboard.
17
+ break_effect: >-
18
+ No effect is bought by hiding focus. Varying the style changes the brand voice of the page: a thick offset ring reads as bold and technical, a quiet underline as editorial.
19
+ test: >-
20
+ The measurer presses Tab through the page, for the first stops only (the report says how many were reached), and compares a picture of each focused element with one taken without focus. Fail for each element where nothing changed. Keyboard operability beyond those first stops is not measured.
21
+ example: >-
22
+ A 2 px outline offset by 2 px on links and buttons.
23
+ counterexample: >-
24
+ A reset style with outline: none on every link and no replacement.
25
+
26
+ - id: AO2
27
+ name: Focus is not hidden by other content
28
+ area: accessibility
29
+ moment: check
30
+ skill: lazuli-accessibility-check
31
+ rule: >-
32
+ Make sure a focused element is not entirely covered by content the page itself placed on top, such as a sticky header, a cookie banner or a chat widget. Leave scroll padding so focused elements land clear of fixed bars.
33
+ why: >-
34
+ If the focused element sits under a fixed bar, the keyboard user is working blind: the indicator is there, but nobody can see it.
35
+ origin: norm
36
+ status: active
37
+ source: >-
38
+ WCAG 2.2, success criterion 2.4.11 Focus Not Obscured (Minimum) (level AA): the focused component is not entirely hidden by author-created content. Opened 2026-11-25: https://www.w3.org/TR/WCAG22/
39
+ measure: a11y.focus-obscured
40
+ when_to_break: >-
41
+ The minimum level only fails when the element is entirely hidden, so partly covered is allowed by the norm itself. A declared break never waives it. What a designer can vary is how it is met: scroll-padding-top equal to the sticky bar height, a bar that hides on scroll down, or a non-modal banner the user can dismiss.
42
+ break_effect: >-
43
+ No effect is bought by letting a bar cover focus. Varying the bar changes how much screen the page keeps: a bar that retracts frees space at the cost of motion.
44
+ test: >-
45
+ For each element reached with Tab, the measurer asks which element is on top at the points of the focused element's box. Fail if all of them are covered by another element that is not part of it. Partly covered passes. Only the first stops are measured.
46
+ example: >-
47
+ A sticky header with scroll-padding-top set to its height.
48
+ counterexample: >-
49
+ A fixed cookie bar that sits over the last form field when it takes focus.
50
+
51
+ - id: AO3
52
+ name: Targets are at least 24 px
53
+ area: accessibility
54
+ moment: check
55
+ skill: lazuli-accessibility-check
56
+ rule: >-
57
+ Make clickable and tappable targets at least 24 by 24 CSS px, or, for a smaller target, leave enough space that a 24 px circle centered on it does not intersect another target or the 24 px circle of another undersized target.
58
+ why: >-
59
+ Small targets packed together cause mistaken taps for people with tremor, large fingers or a mouse they cannot steady.
60
+ origin: norm
61
+ status: active
62
+ source: >-
63
+ WCAG 2.2, success criterion 2.5.8 Target Size (Minimum) (level AA): 24 by 24 CSS pixels, with exceptions Spacing, Equivalent, Inline, User agent control and Essential. Opened 2026-11-25: https://www.w3.org/TR/WCAG22/
64
+ measure: a11y.target-size
65
+ threshold: { minPx: 24 }
66
+ when_to_break: >-
67
+ The norm itself exempts a target with enough spacing around it, a target whose function exists in another conforming control on the page, a link inside a sentence or limited by the line height of its text, a control whose size the browser sets and the page does not change, and a presentation that is essential or legally required. A declared break never waives it. What a designer can vary is how it is met: a larger hit area through padding, more space between small icons, or an equivalent larger control.
68
+ break_effect: >-
69
+ No effect is bought by shrinking a target under the norm. Varying the spacing changes density: small icons with generous gaps look light and airy, bigger targets look sturdy.
70
+ test: >-
71
+ The measurer lists visible interactive elements smaller than the minimum whose 24 px circle meets another target's box, leaving out links in a sentence, targets that have the spacing around them and controls whose size the browser sets and the author did not change. Fail if any. The Equivalent and Essential exemptions need a person's judgment and are not measured.
72
+ example: >-
73
+ Two 16 px icon buttons set 12 px apart, whose 24 px circles do not touch.
74
+ counterexample: >-
75
+ Two adjacent 16 px close and open icons with no gap.
76
+
77
+ - id: AO4
78
+ name: The page has a title
79
+ area: accessibility
80
+ moment: check
81
+ skill: lazuli-accessibility-check
82
+ rule: >-
83
+ Give every page a title element that names the page and tells it apart from the other pages of the site.
84
+ why: >-
85
+ The title is the first thing a screen reader announces and the label of the browser tab and of the history. An empty title leaves the person unsure where they landed.
86
+ origin: norm
87
+ status: active
88
+ source: >-
89
+ WCAG 2.2, success criterion 2.4.2 Page Titled (level A). Opened 2026-11-25: https://www.w3.org/TR/WCAG22/
90
+ measure: a11y.title
91
+ when_to_break: >-
92
+ The norm has no exemption for a missing title, and a declared break never waives it. What a designer can vary is the wording: the order of page name and site name, its length and its tone.
93
+ break_effect: >-
94
+ No effect is bought by an empty title. Putting the page name first helps people who scan many tabs, putting the brand first favors recognition.
95
+ test: >-
96
+ The measurer reads document.title. Fail if it is empty. It checks that a title exists, not that it describes the page: a person or the agent judges the wording.
97
+ example: >-
98
+ "Pricing | Acme".
99
+ counterexample: >-
100
+ A page with an empty title element, shown in the tab as its URL.
@@ -0,0 +1,153 @@
1
+ - id: AP1
2
+ name: Images have a text alternative
3
+ area: accessibility
4
+ moment: check
5
+ skill: lazuli-accessibility-check
6
+ rule: >-
7
+ Give every content image a text alternative that says what the image is for. Mark purely decorative images as decorative (an empty alt attribute) so assistive technology skips them.
8
+ why: >-
9
+ A person who cannot see the image gets nothing from it unless the page says what it carries. An image with no alternative is announced as a file name or skipped without a word.
10
+ origin: norm
11
+ status: active
12
+ source: >-
13
+ WCAG 2.2, success criterion 1.1.1 Non-text Content (level A). Opened 2026-11-25: https://www.w3.org/TR/WCAG22/
14
+ measure: a11y.alt
15
+ when_to_break: >-
16
+ The norm itself exempts decorative content, and the way to use that exemption is to mark the image decorative, not to leave it unmarked. A declared break never waives this norm. What a designer can vary is how the requirement is met: a short alternative, a longer description nearby, or the text of the surrounding link or caption when it already says everything.
17
+ break_effect: >-
18
+ No effect is bought by skipping the alternative. Varying the wording changes only how much a screen reader user hears: a short alternative keeps the flow, a long one gives the full picture.
19
+ test: >-
20
+ The measurer lists the images in the accessibility tree that have no text alternative and are not marked decorative. Fail if any. It checks that an alternative exists, not that the words are right: a person or the agent reads the alternatives and judges them.
21
+ example: >-
22
+ A product photo with alt "Blue ceramic mug, 300 ml, on a wooden table", and a flourish divider with alt="".
23
+ counterexample: >-
24
+ A hero photo with no alt attribute, announced as its file name.
25
+
26
+ - id: AP2
27
+ name: Content reflows at 320 px
28
+ area: accessibility
29
+ moment: check
30
+ skill: lazuli-accessibility-check
31
+ rule: >-
32
+ Make the content usable in one column at a viewport 320 CSS px wide, without scrolling sideways to read text. Parts that need a two-dimensional layout (maps, diagrams, video, games, data tables) may scroll in both directions.
33
+ why: >-
34
+ People who zoom in or use a narrow window need to read line by line. A page that forces sideways scrolling at that width makes every line a trip back and forth.
35
+ origin: norm
36
+ status: active
37
+ source: >-
38
+ WCAG 2.2, success criterion 1.4.10 Reflow (level AA): content presented without loss of information or functionality and without two-dimensional scrolling at a width equivalent to 320 CSS pixels for vertical scrolling. Opened 2026-11-25: https://www.w3.org/TR/WCAG22/
39
+ measure: a11y.reflow
40
+ threshold: { width: 320 }
41
+ when_to_break: >-
42
+ The norm itself exempts content that needs two-dimensional layout, so a wide data table or a map may scroll. A declared break never waives this norm. What a designer can vary is how it is met: stack columns, wrap or truncate with a way to see the rest, or put only the table in a scrolling container while the text around it reflows.
43
+ break_effect: >-
44
+ No effect is bought by letting the page scroll sideways. Varying the layout changes the reading rhythm: a single column reads as a list, a collapsed table trades density for a tap to expand.
45
+ test: >-
46
+ The measurer opens the page at a 320 px wide viewport and reports whether the page scrolls sideways and which elements reach past the edge, leaving out tables, images, code, canvas, video and frames. Fail if content other than those exceptions overflows. The 256 px height rule for horizontal scrolling is not measured.
47
+ example: >-
48
+ A card grid that becomes a single column at 320 px, with a wide price table inside its own scrolling box.
49
+ counterexample: >-
50
+ A fixed 960 px wrapper that makes the whole page scroll sideways on a phone.
51
+
52
+ - id: AP3
53
+ name: Text survives the spacing override
54
+ area: accessibility
55
+ moment: check
56
+ skill: lazuli-accessibility-check
57
+ rule: >-
58
+ Make sure no text is cut off or overlapped when a reader sets line height to at least 1.5 times the font size, paragraph spacing to 2 times, letter spacing to 0.12 times and word spacing to 0.16 times. Do not size boxes so tightly that more space breaks them.
59
+ why: >-
60
+ Readers with dyslexia or low vision often set their own spacing. Fixed-height boxes and clipped containers then hide words or stack them on top of each other.
61
+ origin: norm
62
+ status: active
63
+ source: >-
64
+ WCAG 2.2, success criterion 1.4.12 Text Spacing (level AA): line height 1.5, paragraph spacing 2, letter spacing 0.12 and word spacing 0.16, all times the font size. Opened 2026-11-25: https://www.w3.org/TR/WCAG22/
65
+ measure: a11y.text-spacing
66
+ threshold: { lineHeight: 1.5, paragraphSpacing: 2, letterSpacing: 0.12, wordSpacing: 0.16 }
67
+ when_to_break: >-
68
+ The norm itself lets a language or script that does not use one of these properties conform using only the ones it does use. A declared break never waives this norm. What a designer can vary is the design around it: let boxes grow with their text (min-height instead of height), use a layout that wraps, and keep clipping for purely decorative overflow.
69
+ break_effect: >-
70
+ No effect is bought by clipping text under the override. Varying how boxes grow changes the page's rhythm: containers that grow keep the content whole at the cost of a less rigid grid.
71
+ test: >-
72
+ The measurer applies the four values with an injected style on a copy of the page and lists text that is cut off by its box or overlaps another text block. Fail if any.
73
+ example: >-
74
+ A card whose height follows its text, which just gets taller when spacing grows.
75
+ counterexample: >-
76
+ A banner with a fixed height of 80 px and overflow hidden, where the second line disappears.
77
+
78
+ - id: AP4
79
+ name: Headings outline the page
80
+ area: accessibility
81
+ moment: check
82
+ skill: lazuli-accessibility-check
83
+ rule: >-
84
+ Use heading elements to give the page an outline: one h1 for the page, and sections under it at the next level down without skipping levels.
85
+ why: >-
86
+ Screen reader users jump from heading to heading to find their way. Gaps in the outline make the structure harder to read, and a page with no h1 does not say what it is about.
87
+ origin: source
88
+ status: active
89
+ source: >-
90
+ W3C WCAG 2 Techniques, G141 Organizing a page using headings (opened 2026-11-25: https://www.w3.org/WAI/WCAG22/Techniques/general/G141): headings should be properly nested, for example h1 followed by h2, h2 followed by h2 or h3. The page lists it as related to 1.3.1 (advisory) and 2.4.10 Section Headings (sufficient, AAA). It is not a requirement of its own, and it does not forbid skipped levels or several h1 elements, so findings are hints.
91
+ measure: a11y.headings
92
+ when_to_break: >-
93
+ Several h1 elements or a skipped level can be a legitimate choice, for example a visual size that does not match the document level. Level jumps are only a hint here: the technique is advisory for 1.3.1 and sufficient for 2.4.10 (AAA), and neither makes a skipped level a failure. What a designer can vary is the visual size: style an h2 to look like an h1 instead of choosing the element by size.
94
+ break_effect: >-
95
+ Choosing the element by its look gives the page the exact size it wants and gives up a clean outline for people who navigate by headings. Keep size and level separate to have both.
96
+ test: >-
97
+ The measurer lists the headings in document order. Hint if there is no h1 or a level is skipped going down. It does not judge whether the heading text describes its section (that belongs to 2.4.6 and needs a reader).
98
+ example: >-
99
+ h1 for the page title, h2 for sections, h3 inside a section.
100
+ counterexample: >-
101
+ An h1 followed directly by an h4 chosen because it looks the right size.
102
+
103
+ - id: AP5
104
+ name: The page does not scroll sideways at any checked width
105
+ area: accessibility
106
+ moment: check
107
+ skill: lazuli-accessibility-check
108
+ rule: >-
109
+ Make the page fit the viewport at every width you check, not only at 320 px: no content past the right edge that makes the whole page scroll sideways.
110
+ why: >-
111
+ When lines run past the edge of the viewport, people scroll back and forth to read each line, lose their place and spend more effort. A phone at 390 px meets this as surely as a zoomed window at 320 px.
112
+ origin: source
113
+ status: active
114
+ source: >-
115
+ W3C, Understanding SC 1.4.10 Reflow (WCAG 2.2), https://www.w3.org/WAI/WCAG22/Understanding/reflow.html, section "Intent", opened 2026-11-27: the criterion lets users enlarge content without scrolling in two dimensions, and when lines of text extend beyond the edge of a viewport, users are forced to scroll back and forth to read line by line. The section "Why specifically 320px and 256px?" says 320 CSS px was chosen as a reasonable minimum size. Applying the same reading at widths other than 320 px is our claim, so findings are hints; AP2 stays the norm at 320 px.
116
+ measure: layout.sideways
117
+ when_to_break: >-
118
+ Content that needs two-dimensional layout (a map, a wide data table, a diagram) may scroll inside its own box. The break that is not worth taking is the whole page scrolling sideways because one block is a few pixels too wide. Log a break when a width is consciously left out of the audience's devices.
119
+ break_effect: >-
120
+ Letting the page scroll sideways at a width keeps a decorative block wider than the screen there, and readers at that width scroll back and forth along text lines that run past the edge.
121
+ test: >-
122
+ At each checked width the layout measurer compares the document's scroll width with the viewport width, within the composition tolerance (2 px), and leaves out pages whose html or body hides horizontal overflow. Hint if the page scrolls sideways, with the content width. It does not say which block causes it; AP2 lists offenders at 320 px.
123
+ example: >-
124
+ A 398 px wide promo strip that becomes 100% wide under the phone breakpoint.
125
+ counterexample: >-
126
+ A strip set to 398 px below a 768 px breakpoint, so a 390 px phone scrolls sideways by 8 px.
127
+
128
+ - id: AP6
129
+ name: Large images are not all marked decorative
130
+ area: accessibility
131
+ moment: check
132
+ skill: lazuli-accessibility-check
133
+ rule: >-
134
+ When a page has large images, check that the ones carrying content (a product, a person, a proof) have a text alternative. Marking every image decorative passes AP1 and still tells a screen reader user nothing about them.
135
+ why: >-
136
+ An empty alt attribute tells assistive technology to skip the image. On a page where the product shot and the customer photos all carry alt="", a person who cannot see them hears none of what they show.
137
+ origin: hypothesis
138
+ status: hypothesis
139
+ hypothesis: H2
140
+ source: >-
141
+ Related to WCAG 2.2, success criterion 1.1.1 Non-text Content (level A), which exempts only images that are pure decoration (see AP1). Whether a given image is decorative needs a reader; the size cutoff that picks the images worth asking about is our claim (H2), so findings are hints.
142
+ measure: a11y.decorative-images
143
+ threshold: { minSidePx: 120 }
144
+ when_to_break: >-
145
+ A page whose large images really are decoration (a texture, a mood photo that the text beside it already describes) can leave them all decorative. Record it with break-a-rule (`record-break --rule AP6`) so the report shows a kept break, or log `--rule "AP6 accepted"` so the memo says it was left open on purpose; the hint still shows.
146
+ break_effect: >-
147
+ Keeping every image decorative gives a shorter screen reader flow; it costs the content of any image that carried more than mood.
148
+ test: >-
149
+ The measurer lists the visible img elements whose rendered width and height are both at least minSidePx, and whether each is marked decorative (alt="", role presentation or none, or inside aria-hidden). Hint if every one of them is decorative. With no large image there is no finding. It does not judge whether an image carries content; a person or the agent looks at them.
150
+ example: >-
151
+ A product photo with alt "Blue ceramic mug, 300 ml", beside decorative leaf ornaments with alt="".
152
+ counterexample: >-
153
+ A sales page whose product shot and four customer portraits all have alt="".
@@ -0,0 +1,24 @@
1
+ - id: AR1
2
+ name: Controls have a name
3
+ area: accessibility
4
+ moment: check
5
+ skill: lazuli-accessibility-check
6
+ rule: >-
7
+ Give every button, link and form field an accessible name: visible text, a label, aria-label, aria-labelledby or visually hidden text. Icon-only controls need one too.
8
+ why: >-
9
+ Assistive technology announces a control by its name and role. A control with no name is announced as "button" or "edit text", and the person cannot tell what it does.
10
+ origin: norm
11
+ status: active
12
+ source: >-
13
+ WCAG 2.2, success criterion 4.1.2 Name, Role, Value (level A): for user interface components, the name and role can be programmatically determined. Opened 2026-11-25: https://www.w3.org/TR/WCAG22/
14
+ measure: a11y.names
15
+ when_to_break: >-
16
+ The norm has no exemption for an unnamed control, and a declared break never waives it. What a designer can vary is where the name comes from and whether it is shown: a visible label, a visually hidden label, or an aria-label on an icon, and how long the name is.
17
+ break_effect: >-
18
+ No effect is bought by leaving a control unnamed. A visible label helps everyone and costs space, an icon with a hidden name keeps the layout light and helps only assistive technology.
19
+ test: >-
20
+ The measurer reads names from the browser's accessibility tree and lists buttons, links, text fields, checkboxes, radios, tabs, switches, sliders and similar controls with an empty name. Fail if any. Roles and values of custom widgets, and whether the name is a good one, are not checked.
21
+ example: >-
22
+ A search icon button with aria-label="Search".
23
+ counterexample: >-
24
+ A button that holds only an SVG, announced as "button".
@@ -0,0 +1,72 @@
1
+ - id: AU1
2
+ name: The page declares its language
3
+ area: accessibility
4
+ moment: check
5
+ skill: lazuli-accessibility-check
6
+ rule: >-
7
+ Set the lang attribute on the html element to the main language of the page, for example pt-BR or en.
8
+ why: >-
9
+ Screen readers pick the voice and pronunciation from the declared language. A Portuguese page read with an English voice is close to unintelligible.
10
+ origin: norm
11
+ status: active
12
+ source: >-
13
+ WCAG 2.2, success criterion 3.1.1 Language of Page (level A): the default human language of each page can be programmatically determined. Opened 2026-11-25: https://www.w3.org/TR/WCAG22/
14
+ measure: a11y.lang
15
+ when_to_break: >-
16
+ The norm has no exemption for a missing language, and a declared break never waives it. What a designer can vary is which language tag is used (pt-BR or pt, en-US or en), and parts in another language can carry their own lang without changing the page default.
17
+ break_effect: >-
18
+ No effect is bought by leaving the language out. A regional tag lets the voice use local pronunciation, a plain tag leaves that to the reader's settings.
19
+ test: >-
20
+ The measurer reads the lang attribute of the html element. Fail if it is empty. It does not check that the tag matches the language of the text.
21
+ example: >-
22
+ html lang="pt-BR" on a Brazilian Portuguese page.
23
+ counterexample: >-
24
+ An html element with no lang on a page written in Portuguese.
25
+
26
+ - id: AU2
27
+ name: Link text says where it goes
28
+ area: accessibility
29
+ moment: check
30
+ skill: lazuli-accessibility-check
31
+ rule: >-
32
+ Name links by their purpose. Avoid links whose whole name is a generic phrase such as "click here" or "read more", or make sure the surrounding text gives them a clear purpose.
33
+ why: >-
34
+ Screen reader users often list all the links of a page out of context. A list of ten "read more" tells them nothing.
35
+ origin: hypothesis
36
+ status: hypothesis
37
+ hypothesis: H1
38
+ source: >-
39
+ Related to WCAG 2.2, success criterion 2.4.4 Link Purpose (In Context) (level A), which requires the purpose of a link to be determined from its text or its programmatic context. Opened 2026-11-25: https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-in-context.html. The criterion does not forbid generic text when context supplies the purpose, and it lists no phrases. The phrase list in the threshold is our claim, so findings are hints.
40
+ measure: a11y.generic-links
41
+ threshold:
42
+ phrases:
43
+ - click here
44
+ - here
45
+ - this link
46
+ - read more
47
+ - learn more
48
+ - more
49
+ - more info
50
+ - more information
51
+ - details
52
+ - clique aqui
53
+ - aqui
54
+ - este link
55
+ - leia mais
56
+ - saiba mais
57
+ - ver mais
58
+ - mais
59
+ - mais informações
60
+ - mais informacoes
61
+ - detalhes
62
+ when_to_break: >-
63
+ A generic link inside a card whose title sits in the same link or in its programmatic context (the criterion accepts purpose from context). What a designer can vary is how the purpose is given: the card title as the link name, visually hidden text after the phrase, or aria-labelledby pointing to the title.
64
+ break_effect: >-
65
+ A short "Read more" keeps the layout clean and repeatable, and costs nothing when the context carries the purpose. Without it, people who list links hear a wall of the same words.
66
+ test: >-
67
+ The measurer lists links whose accessible name, after lowercasing and trimming punctuation, is exactly one of the phrases in the threshold. Hint for each. It cannot tell whether context supplies the purpose, so a person or the agent decides.
68
+ example: >-
69
+ A link named "Read the 2026 annual report".
70
+ counterexample: >-
71
+ Ten cards that each end in a link named "Read more".
72
+
@@ -0,0 +1,27 @@
1
+ # Hypotheses to validate in the A/B
2
+
3
+ Numbers that do not come from Heller's book or from a standard. They were taken out of the active rules by decision of the author (2026-11-24) and only go back into a rule after the A/B shows they improve the result. The WCAG 2.2 minimums (4.5:1 for normal text; 3:1 for large text and components) are not listed here: they are a standard and stay in the rules.
4
+
5
+ | ID | Principle | Candidate limit | How to validate in the A/B |
6
+ |---|---|---|---|
7
+ | H1 | PA4 (one pure color) | A saturated pure color covers between 5% and 15% of the area on a screen meant for use; above 25% fails | Correlate the measured area with the human choice "communicates better" |
8
+ | H2 | PA4 | Saturated means HSL saturation above 60% and lightness between 25% and 75% | Check whether the definition separates what raters call a "strong color" |
9
+ | H3 | PA2 (black inverts) | A black block above 5% of the area touching the brand color | Compare pages above and below the limit on cheerful brands |
10
+ | H4 | PA3 (opposites) | An area ratio of at least 4:1 between the two colors of an opposite pair | Pairs with different ratios, asking "does it look intentional?" |
11
+ | H5 | PA5 (undertone) | Warm neutrals with HSL hue from 0 to 60 degrees; cool ones from 180 to 260 degrees | See whether the range matches raters' warm and cool judgment |
12
+ | H6 | PA6 (purity) | Brand color with HSL saturation above 45%; greenish yellow fails at hue 50 to 65, saturation below 60% and lightness above 55% | Ask "does it look clean or dirty?" for yellows inside and outside the range |
13
+ | H7 | PA7 (metal) | Gold below 5% of the area, at most 2 types of element | Perceived ostentation against gold area |
14
+ | H8 | PA9 (elegance) | Saturated orange or magenta above 5% on a premium screen fails | "Does it look expensive?" against measured area |
15
+ | H9 | PA11, RV9, ES4 | A 20 px blur as the default for the salience test | Compare 10, 20 and 30 px with the element raters point to as most visible |
16
+ | H10 | RV3 (neutral text) | Text in a chromatic color below 10% of the total; a block above 80 characters in color fails. Chromatic means the largest and smallest RGB channels of the rendered text color differ by more than 40 (of 255) | Measure reading and comprehension in versions with and without |
17
+ | H11 | RV4 (dark background) | A dominant background with relative luminance below 0.2 on a reading screen fails; accents above 80% saturation on #000 in dark mode fail | Reported reading comfort |
18
+ | H12 | RV5 (vibration) | Two neighboring chromatic colors with a contrast ratio below 1.5:1 between them fail | The question "does any part bother the eyes?" |
19
+ | H13 | RV6 (function) | An overlay on food that shifts the mean hue by more than 10 degrees; saturated red above 5% on a health screen | Reported appetite and comfort |
20
+ | H14 | RV7 (finish) | Premium with more than 50% in a single flat gray; solid dark brown above 15% | "Does it look expensive?" |
21
+ | H15 | RV8 (white) | Pure white above 85% with no image or warm accent when the intent is welcome | "Does it feel welcoming or like a hospital?" |
22
+ | H16 | ES3 (red against green) | A contrast ratio of at least 1.5:1 between the success green and the error red | Test with deuteranopia simulation and, if possible, with color-blind people |
23
+ | H17 | ES6 (brand against error) | Brand and error of the same hue separated by at least 1.5:1 or 15 degrees of hue | Time to identify the error on a screen with the brand |
24
+ | H18 | ES7 (severity) | Neighboring levels with a luminance ratio of at least 1.2:1 | Correct ordering of the levels in grayscale |
25
+ | H19 | ES8 (chart) | At most 6 saturated colors in a categorical chart | Accuracy and reading time of the chart |
26
+ | H20 | CX4 (age) | An audience of 50 and older with more than 40% of the area in black, gray or brown fails | Preference of the 50 and older audience |
27
+ | H21 | ES5 (yellow text) | Yellow or amber text means HSL hue from 40 to 70 degrees with saturation above 40%. Text counts as a warning when it or an ancestor up to its nearest section, article, aside or body has a class or id containing one of these words, in English and Portuguese, compared without case or accents: warn, warning, alert, caution, aviso, atencao, cuidado; or when the text starts with one of them followed by a colon. The word list is our claim, WCAG and the source name no words for a warning; the ARIA roles alert and status also mark a warning, and they are a standard, not part of the claim | Check whether the band matches what raters call yellow or amber text on a light background. For the words, list the yellow texts the rule skips and the ones it judges on real pages, and ask raters which ones read as a warning; add the words they point to and drop the ones that catch no warning |
@@ -0,0 +1,10 @@
1
+ area: color
2
+ title: Color
3
+ summary: Palette by intent, review on the rendered screen, culture and sector, states and signals.
4
+ order: 10
5
+ prefixes: [PA, RV, CX, ES]
6
+ skills:
7
+ - lazuli-color-palette-by-intent
8
+ - lazuli-color-screen-review
9
+ - lazuli-color-context-and-culture
10
+ - lazuli-color-states-and-signals
@@ -0,0 +1,183 @@
1
+ - id: CX1
2
+ name: Know where each color meaning comes from
3
+ area: color
4
+ moment: adapt
5
+ skill: lazuli-color-context-and-culture
6
+ rule: >-
7
+ Classify the origin of every color association before trusting it, on four levels. (1) Physical basis, which travels well: red as fire and blood, blue as sky, distance and cold, green as vegetation, black as night, white as light and visible cleanliness, brown as earth and roast. (2) International convention, which travels well: traffic lights, prohibition signs with a red border, black on yellow for danger, green for emergency exit, the white flag of surrender. (3) European or German, a hypothesis elsewhere: blue as fidelity, yellow as betrayal and envy, green as hope, violet as penance, gray as boredom and cruelty. (4) German idiom, which does not travel: avoid it.
8
+ why: >-
9
+ Associations have different origins, and only those tied to physical experience or to international convention tend to hold in another country.
10
+ origin: hypothesis
11
+ source: >-
12
+ Heller, Psychology of Color, introduction (German sample, associations lived and rooted in language); ch. Red s.2; ch. Green s.13; ch. Blue s.25. The four-level classification is our own.
13
+ when_to_break: >-
14
+ If local research on the audience exists (yours or someone else's), it outweighs this classification.
15
+ break_effect: >-
16
+ The viewer meets an association grounded in their own local evidence, so it feels natural to them instead of imported.
17
+ test: >-
18
+ The palette document lists each association with its level from 1 to 4. Fail if a level 3 association is presented as fact for a non-European audience, or if any level 4 appears.
19
+ example: >-
20
+ Blue conveys trust (level 3, strong hypothesis; illustrative example of a logged check, not real data: tested with 6 people, 5 said "bank or insurance").
21
+ counterexample: >-
22
+ Yellow conveys betrayal, so avoid it, said about a brand in a non-European market.
23
+
24
+ - id: CX2
25
+ name: Check mourning, celebration and sacred colors
26
+ area: color
27
+ moment: adapt
28
+ skill: lazuli-color-context-and-culture
29
+ rule: >-
30
+ For a specific audience or market, check death, celebration and sacred colors against this list. White is mourning in part of Asia (tied to rebirth), so a plain matte white can read as a funeral. Red is happiness, marriage and money in China and India. Yellow is majesty and wisdom in China (the imperial color) and divine worth in India. Green is sacred in Islam, so linking it to something bad is unthinkable there. Orange or saffron is enlightenment in Buddhism. Orange and green carry sectarian weight in Ireland. Violet is penance and liturgical mourning in Catholicism. In translation, English "purple" is violet and German "pink" is magenta.
31
+ why: >-
32
+ The colors of death, celebration and religion are among those that change most between cultures.
33
+ origin: source
34
+ source: >-
35
+ Heller, Psychology of Color, ch. White s.9 and s.10; ch. Red s.6; ch. Yellow s.14; ch. Green s.10; ch. Orange s.10 and s.12; ch. Violet s.3 and s.6; ch. Pink s.9
36
+ when_to_break: >-
37
+ A global product with no dominant audience: prefer level 1 and 2 associations (see CX1).
38
+ break_effect: >-
39
+ The viewer meets a neutral, broadly safe palette that offends no one and also belongs to no one in particular.
40
+ test: >-
41
+ For each target market in the briefing, the palette was checked against this list and the result is written down. Fail if any Asian or Islamic market has no check.
42
+ example: >-
43
+ A Lunar New Year campaign in red and gold.
44
+ counterexample: >-
45
+ Gift packaging in white and matte gray for the Chinese market.
46
+
47
+ - id: CX3
48
+ name: Climate changes warm and cool
49
+ area: color
50
+ moment: adapt
51
+ skill: lazuli-color-context-and-culture
52
+ rule: >-
53
+ Let climate change the value of warm and cool. In cold countries warm colors sound good. In a hot climate the coolness of blue becomes pleasant freshness and red can sound threatening. Treat blue, aqua green and white as reading as freshness and relief in a hot country, as a favorable hypothesis. Test seasonal palettes (winter, Christmas, summer) against the audience's real climate on that date.
54
+ why: >-
55
+ The felt temperature of a color depends on the weather of the viewer. A European winter and Christmas palette of white, silver, ice blue and snow does not match a December that is summer in the southern hemisphere.
56
+ origin: hypothesis
57
+ source: >-
58
+ Heller, Psychology of Color, ch. Red s.4 (red evil in ancient Egypt, beautiful in Russia); ch. Blue s.7 (in hot countries the cold of blue is welcome); ch. White s.13 (the winter chord holds for Germany, the author warns). Applying this to a specific country is our own hypothesis.
59
+ when_to_break: >-
60
+ A brand that sells exactly the European or Nordic imaginary.
61
+ break_effect: >-
62
+ The viewer feels a deliberate escape to another climate, a fantasy of winter that reads as exotic rather than local.
63
+ test: >-
64
+ If the piece is seasonal, the palette was compared with the audience's real climate on the date. For freshness, ask 5 people "warm, neutral or cool?".
65
+ example: >-
66
+ A summer campaign with pool blue, white and sun yellow in a hot country.
67
+ counterexample: >-
68
+ A Christmas store in a tropical city with ice-blue snow and silver.
69
+
70
+ - id: CX4
71
+ name: Match the palette to the audience age
72
+ area: color
73
+ moment: adapt
74
+ skill: lazuli-color-context-and-culture
75
+ rule: >-
76
+ Match the palette to the audience age. Up to about 25, black and intense colors work and pink infantilizes. For 50 and older, avoid a palette dominated by black, gray and brown. Light, luminous colors and adult pink are accepted. Do not use lilac as "the color of the mature woman", because it is a stereotype.
77
+ why: >-
78
+ Taste in color shifts with age. Black is strongly preferred by the young and rejected by the old, pink is rejected by the young and accepted by older people, brown and gray are rejected more with age, and luminous colors gain appeal.
79
+ origin: source
80
+ source: >-
81
+ Heller, Psychology of Color, ch. Black (age preference data) and s.17 (black flatters a young face and hardens a mature one); ch. Pink (age preference) and s.4; ch. Brown s.1; ch. Gray s.1; ch. Yellow (luminous colors and age); ch. Violet s.18
82
+ when_to_break: >-
83
+ A brand that deliberately breaks the age stereotype (for example, a 60+ product with a young, dark look). Test it with the audience.
84
+ break_effect: >-
85
+ The viewer feels addressed as someone ageless, with a bolder, more modern identity than their age group is expected to like.
86
+ test: >-
87
+ Cross the briefing audience with the palette. Fail if the audience is 50 and older and black, gray or brown dominate the screen. Fail if the audience is teenage and the main color is light pink with no declared intent.
88
+ example: >-
89
+ A health app for people over 60 with a light background, blue and coral.
90
+ counterexample: >-
91
+ A portal for retirees on a black and gray background.
92
+
93
+ - id: CX5
94
+ name: Do not code gender by color alone
95
+ area: color
96
+ moment: adapt
97
+ skill: lazuli-color-context-and-culture
98
+ rule: >-
99
+ Do not use color as the only code for gender in a product, form or chart. In data, mark gender with a label and a shape, and avoid pink and blue by default.
100
+ why: >-
101
+ Pink for girls and blue for boys is about a century old, settled internationally only around 1970 and already losing force. Before that, pink was at times a boy's color.
102
+ origin: source
103
+ source: >-
104
+ Heller, Psychology of Color, ch. Pink s.5; ch. Blue s.10 and s.11; ch. Red s.5
105
+ when_to_break: >-
106
+ A client explicitly asks for the convention for a traditional children's product. Record that it is a commercial choice.
107
+ break_effect: >-
108
+ The viewer reads an immediate, traditional shorthand for a gendered product, which feels familiar and conventional rather than neutral.
109
+ test: >-
110
+ In charts and gender selectors, a text label exists, and color alone does not tell the categories apart.
111
+ example: >-
112
+ An audience chart with orange and teal and a written legend.
113
+ counterexample: >-
114
+ A form that switches its theme to pink when "female" is selected.
115
+
116
+ - id: CX6
117
+ name: Check the palette against the sector
118
+ area: color
119
+ moment: adapt
120
+ skill: lazuli-color-context-and-culture
121
+ rule: >-
122
+ Check the palette against the sector's expected chord and its trap. If the palette leaves what the sector expects, write down the reason (differentiation) and the risk.
123
+ why: >-
124
+ The same chord pleases in one sector and fails in another, because color is judged by the function of the product.
125
+ origin: source
126
+ source: >-
127
+ Heller, Psychology of Color, synthesis of several chapters (cited line by line in the sector reference)
128
+ when_to_break: >-
129
+ When every competitor uses the same chord and differentiating is worth the risk (see PA8).
130
+ break_effect: >-
131
+ The viewer notices a brand that stands apart from its category, which feels fresh and memorable, with the risk of seeming off for the product.
132
+ test: >-
133
+ The palette was compared with the sector line and each deviation has a written reason. Fail if it lands in a sector "trap" without a reason.
134
+ example: >-
135
+ A fintech in blue and white with a green accent for gains.
136
+ counterexample: >-
137
+ A natural food brand in silver, violet and black.
138
+
139
+ - id: CX7
140
+ name: Check the political history of the colors
141
+ area: color
142
+ moment: adapt
143
+ skill: lazuli-color-context-and-culture
144
+ rule: >-
145
+ Check the political and persecution history of the palette in the destination country. From the source material, brown is tied to Nazism in Germany, yellow was a mark of exclusion (the yellow star imposed on Jews, which is why liturgies use gold), pink was the triangle of the Nazi camps, and red belongs to left-wing movements. For Brazil the source says nothing, so treat as a hypothesis to check the recent political use of national and party colors and the colors of regional football clubs, by asking the client.
146
+ why: >-
147
+ Colors carry political and persecution uses that weigh heavily in certain countries.
148
+ origin: source
149
+ source: >-
150
+ Heller, Psychology of Color, ch. Brown s.11; ch. Yellow s.12 and s.13; ch. Pink s.5; ch. Red s.15. The items on Brazil are our own hypothesis.
151
+ when_to_break: >-
152
+ It is never broken; it is only decided with information.
153
+ break_effect: >-
154
+ Choosing against a known political reading makes the viewer feel a deliberate and informed stance, which reads as either bold or tone deaf depending on the audience.
155
+ test: >-
156
+ For a public campaign, government or social cause, there is a line stating the political weight of the palette in the country and who it was checked with.
157
+ example: >-
158
+ A city hall that avoids the mayor's party color in its institutional identity.
159
+ counterexample: >-
160
+ A German clothing brand with brown uniforms for its staff.
161
+
162
+ - id: CX8
163
+ name: Name colors by role in tokens, by value in copy
164
+ area: color
165
+ moment: adapt
166
+ skill: lazuli-color-context-and-culture
167
+ rule: >-
168
+ In copy, product names and public token names, use the name that carries the wanted value. In a technical token, use a role name (action-primary), not a color name, so the color can change without lying.
169
+ why: >-
170
+ The same tone gains or loses value with its name: a handsome yellow becomes "golden" or "honey", and gray becomes "silvery" or "graphite". Advertising knows this.
171
+ origin: source
172
+ source: >-
173
+ Heller, Psychology of Color, ch. Yellow s.4; ch. Silver s.13; ch. Gold s.15. The token rule is our own hypothesis.
174
+ when_to_break: >-
175
+ When the valued name promises something the color does not deliver (calling flat yellow "gold" makes it worse, see PA7).
176
+ break_effect: >-
177
+ The viewer reads the plain color name as honest and literal, which feels modest, with no borrowed prestige.
178
+ test: >-
179
+ Product copy and color variants use value names, and tokens use role names.
180
+ example: >-
181
+ A "graphite" variant of a headset.
182
+ counterexample: >-
183
+ A "gray" variant on a premium product page.