waypoint-skills 1.3.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.
- package/LICENSE +21 -0
- package/README.md +348 -0
- package/README.npm.md +56 -0
- package/cli/bin/cli.js +127 -0
- package/cli/bin/lib/paths.mjs +31 -0
- package/cli/bin/postinstall.mjs +25 -0
- package/manifest.json +107 -0
- package/package.json +44 -0
- package/packages/agents/inspiration-scout.md +105 -0
- package/packages/agents/orchestrator.md +186 -0
- package/packages/agents/scrutiny-validator.md +136 -0
- package/packages/agents/user-testing-validator.md +171 -0
- package/packages/agents/validator.md +102 -0
- package/packages/agents/worker.md +116 -0
- package/packages/agents/wp-router.md +69 -0
- package/packages/hooks/hooks.json.example +12 -0
- package/packages/hooks/templates/mission-worktree-bootstrap.sh +88 -0
- package/packages/hooks/templates/run-assertions.sh +48 -0
- package/packages/rules/adversarial-context-isolation.mdc +57 -0
- package/packages/rules/serial-git-enforcement.mdc +77 -0
- package/packages/skills/caveman/SKILL.md +78 -0
- package/packages/skills/design-taste-frontend/SKILL.md +1206 -0
- package/packages/skills/gpt-taste/SKILL.md +74 -0
- package/packages/skills/impeccable/SKILL.md +164 -0
- package/packages/skills/impeccable/reference/adapt.md +311 -0
- package/packages/skills/impeccable/reference/animate.md +201 -0
- package/packages/skills/impeccable/reference/audit.md +133 -0
- package/packages/skills/impeccable/reference/bolder.md +120 -0
- package/packages/skills/impeccable/reference/brand.md +108 -0
- package/packages/skills/impeccable/reference/clarify.md +288 -0
- package/packages/skills/impeccable/reference/codex.md +105 -0
- package/packages/skills/impeccable/reference/colorize.md +257 -0
- package/packages/skills/impeccable/reference/craft.md +123 -0
- package/packages/skills/impeccable/reference/critique.md +780 -0
- package/packages/skills/impeccable/reference/delight.md +302 -0
- package/packages/skills/impeccable/reference/distill.md +111 -0
- package/packages/skills/impeccable/reference/document.md +429 -0
- package/packages/skills/impeccable/reference/extract.md +69 -0
- package/packages/skills/impeccable/reference/harden.md +347 -0
- package/packages/skills/impeccable/reference/hooks.md +90 -0
- package/packages/skills/impeccable/reference/init.md +172 -0
- package/packages/skills/impeccable/reference/interaction-design.md +189 -0
- package/packages/skills/impeccable/reference/layout.md +161 -0
- package/packages/skills/impeccable/reference/live.md +718 -0
- package/packages/skills/impeccable/reference/onboard.md +234 -0
- package/packages/skills/impeccable/reference/optimize.md +258 -0
- package/packages/skills/impeccable/reference/overdrive.md +130 -0
- package/packages/skills/impeccable/reference/polish.md +241 -0
- package/packages/skills/impeccable/reference/product.md +60 -0
- package/packages/skills/impeccable/reference/quieter.md +99 -0
- package/packages/skills/impeccable/reference/shape.md +165 -0
- package/packages/skills/impeccable/reference/typeset.md +279 -0
- package/packages/skills/impeccable/scripts/command-metadata.json +94 -0
- package/packages/skills/impeccable/scripts/context-signals.mjs +225 -0
- package/packages/skills/impeccable/scripts/context.mjs +961 -0
- package/packages/skills/impeccable/scripts/critique-storage.mjs +242 -0
- package/packages/skills/impeccable/scripts/detect-csp.mjs +198 -0
- package/packages/skills/impeccable/scripts/detect.mjs +21 -0
- package/packages/skills/impeccable/scripts/detector/browser/injected/index.mjs +1937 -0
- package/packages/skills/impeccable/scripts/detector/cli/main.mjs +290 -0
- package/packages/skills/impeccable/scripts/detector/design-system.mjs +750 -0
- package/packages/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +5185 -0
- package/packages/skills/impeccable/scripts/detector/detect-antipatterns.mjs +50 -0
- package/packages/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +277 -0
- package/packages/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +568 -0
- package/packages/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +1015 -0
- package/packages/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +234 -0
- package/packages/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
- package/packages/skills/impeccable/scripts/detector/findings.mjs +12 -0
- package/packages/skills/impeccable/scripts/detector/node/file-system.mjs +198 -0
- package/packages/skills/impeccable/scripts/detector/profile/profiler.mjs +166 -0
- package/packages/skills/impeccable/scripts/detector/registry/antipatterns.mjs +459 -0
- package/packages/skills/impeccable/scripts/detector/rules/checks.mjs +2707 -0
- package/packages/skills/impeccable/scripts/detector/shared/color.mjs +124 -0
- package/packages/skills/impeccable/scripts/detector/shared/constants.mjs +101 -0
- package/packages/skills/impeccable/scripts/detector/shared/inline-ignores.mjs +148 -0
- package/packages/skills/impeccable/scripts/detector/shared/page.mjs +7 -0
- package/packages/skills/impeccable/scripts/hook-admin.mjs +660 -0
- package/packages/skills/impeccable/scripts/hook-before-edit.mjs +476 -0
- package/packages/skills/impeccable/scripts/hook-lib.mjs +1632 -0
- package/packages/skills/impeccable/scripts/hook.mjs +61 -0
- package/packages/skills/impeccable/scripts/lib/design-parser.mjs +842 -0
- package/packages/skills/impeccable/scripts/lib/impeccable-config.mjs +638 -0
- package/packages/skills/impeccable/scripts/lib/impeccable-paths.mjs +128 -0
- package/packages/skills/impeccable/scripts/lib/is-generated.mjs +69 -0
- package/packages/skills/impeccable/scripts/lib/target-args.mjs +42 -0
- package/packages/skills/impeccable/scripts/live/browser-script-parts.mjs +49 -0
- package/packages/skills/impeccable/scripts/live/completion.mjs +19 -0
- package/packages/skills/impeccable/scripts/live/event-validation.mjs +137 -0
- package/packages/skills/impeccable/scripts/live/insert-ui.mjs +458 -0
- package/packages/skills/impeccable/scripts/live/manual-apply.mjs +939 -0
- package/packages/skills/impeccable/scripts/live/manual-edit-routes.mjs +357 -0
- package/packages/skills/impeccable/scripts/live/manual-edits-buffer.mjs +152 -0
- package/packages/skills/impeccable/scripts/live/session-store.mjs +289 -0
- package/packages/skills/impeccable/scripts/live/svelte-component.mjs +826 -0
- package/packages/skills/impeccable/scripts/live/sveltekit-adapter.mjs +274 -0
- package/packages/skills/impeccable/scripts/live/ui-core.mjs +180 -0
- package/packages/skills/impeccable/scripts/live/vocabulary.mjs +36 -0
- package/packages/skills/impeccable/scripts/live-accept.mjs +812 -0
- package/packages/skills/impeccable/scripts/live-browser-dom.js +146 -0
- package/packages/skills/impeccable/scripts/live-browser-session.js +123 -0
- package/packages/skills/impeccable/scripts/live-browser.js +11173 -0
- package/packages/skills/impeccable/scripts/live-commit-manual-edits.mjs +1241 -0
- package/packages/skills/impeccable/scripts/live-complete.mjs +75 -0
- package/packages/skills/impeccable/scripts/live-copy-edit-agent.mjs +683 -0
- package/packages/skills/impeccable/scripts/live-discard-manual-edits.mjs +51 -0
- package/packages/skills/impeccable/scripts/live-inject.mjs +583 -0
- package/packages/skills/impeccable/scripts/live-insert.mjs +272 -0
- package/packages/skills/impeccable/scripts/live-manual-edit-evidence.mjs +363 -0
- package/packages/skills/impeccable/scripts/live-poll.mjs +384 -0
- package/packages/skills/impeccable/scripts/live-resume.mjs +94 -0
- package/packages/skills/impeccable/scripts/live-server.mjs +1135 -0
- package/packages/skills/impeccable/scripts/live-status.mjs +61 -0
- package/packages/skills/impeccable/scripts/live-target.mjs +30 -0
- package/packages/skills/impeccable/scripts/live-wrap.mjs +894 -0
- package/packages/skills/impeccable/scripts/live.mjs +297 -0
- package/packages/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/packages/skills/impeccable/scripts/palette.mjs +633 -0
- package/packages/skills/impeccable/scripts/pin.mjs +214 -0
- package/packages/skills/ponytail/SKILL.md +117 -0
- package/packages/skills/stitch-design-taste/DESIGN.md +121 -0
- package/packages/skills/stitch-design-taste/SKILL.md +184 -0
- package/packages/skills/waypoint/SKILL.md +67 -0
- package/packages/skills/wp/SKILL.md +330 -0
- package/packages/skills/wp/caveman-wire.md +148 -0
- package/packages/skills/wp/reference.md +411 -0
- package/scripts/detect-platform.sh +32 -0
- package/scripts/install.sh +123 -0
- package/scripts/lib/common.sh +215 -0
- package/scripts/sync-skills.sh +21 -0
- package/scripts/uninstall.sh +38 -0
- package/scripts/waypoint +281 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
> **Additional context needed**: audience technical level and users' mental state in context.
|
|
2
|
+
|
|
3
|
+
Find the unclear, confusing, or poorly written interface text and rewrite it. Vague copy creates support tickets and abandonment; specific copy gets users through the task.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Assess Current Copy
|
|
9
|
+
|
|
10
|
+
Identify what makes the text unclear or ineffective:
|
|
11
|
+
|
|
12
|
+
1. **Find clarity problems**:
|
|
13
|
+
- **Jargon**: Technical terms users won't understand
|
|
14
|
+
- **Ambiguity**: Multiple interpretations possible
|
|
15
|
+
- **Passive voice**: "Your file has been uploaded" vs "We uploaded your file"
|
|
16
|
+
- **Length**: Too wordy or too terse
|
|
17
|
+
- **Assumptions**: Assuming user knowledge they don't have
|
|
18
|
+
- **Missing context**: Users don't know what to do or why
|
|
19
|
+
- **Tone mismatch**: Too formal, too casual, or inappropriate for situation
|
|
20
|
+
|
|
21
|
+
2. **Understand the context**:
|
|
22
|
+
- Who's the audience? (Technical? General? First-time users?)
|
|
23
|
+
- What's the user's mental state? (Stressed during error? Confident during success?)
|
|
24
|
+
- What's the action? (What do we want users to do?)
|
|
25
|
+
- What's the constraint? (Character limits? Space limitations?)
|
|
26
|
+
|
|
27
|
+
**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets.
|
|
28
|
+
|
|
29
|
+
## Plan Copy Improvements
|
|
30
|
+
|
|
31
|
+
Create a strategy for clearer communication:
|
|
32
|
+
|
|
33
|
+
- **Primary message**: What's the ONE thing users need to know?
|
|
34
|
+
- **Action needed**: What should users do next (if anything)?
|
|
35
|
+
- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?)
|
|
36
|
+
- **Constraints**: Length limits, brand voice, localization considerations
|
|
37
|
+
|
|
38
|
+
**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words.
|
|
39
|
+
|
|
40
|
+
## Improve Copy Systematically
|
|
41
|
+
|
|
42
|
+
Refine text across these common areas:
|
|
43
|
+
|
|
44
|
+
### Error Messages
|
|
45
|
+
**Bad**: "Error 403: Forbidden"
|
|
46
|
+
**Good**: "You don't have permission to view this page. Contact your admin for access."
|
|
47
|
+
|
|
48
|
+
**Bad**: "Invalid input"
|
|
49
|
+
**Good**: "Email addresses need an @ symbol. Try: name@example.com"
|
|
50
|
+
|
|
51
|
+
**Principles**:
|
|
52
|
+
- Explain what went wrong in plain language
|
|
53
|
+
- Suggest how to fix it
|
|
54
|
+
- Don't blame the user
|
|
55
|
+
- Include examples when helpful
|
|
56
|
+
- Link to help/support if applicable
|
|
57
|
+
|
|
58
|
+
### Form Labels & Instructions
|
|
59
|
+
**Bad**: "DOB (MM/DD/YYYY)"
|
|
60
|
+
**Good**: "Date of birth" (with placeholder showing format)
|
|
61
|
+
|
|
62
|
+
**Bad**: "Enter value here"
|
|
63
|
+
**Good**: "Your email address" or "Company name"
|
|
64
|
+
|
|
65
|
+
**Principles**:
|
|
66
|
+
- Use clear, specific labels (not generic placeholders)
|
|
67
|
+
- Show format expectations with examples
|
|
68
|
+
- Explain why you're asking (when not obvious)
|
|
69
|
+
- Put instructions before the field, not after
|
|
70
|
+
- Keep required field indicators clear
|
|
71
|
+
|
|
72
|
+
### Button & CTA Text
|
|
73
|
+
**Bad**: "Click here" | "Submit" | "OK"
|
|
74
|
+
**Good**: "Create account" | "Save changes" | "Got it, thanks"
|
|
75
|
+
|
|
76
|
+
**Principles**:
|
|
77
|
+
- Describe the action specifically
|
|
78
|
+
- Use active voice (verb + noun)
|
|
79
|
+
- Match user's mental model
|
|
80
|
+
- Be specific ("Save" is better than "OK")
|
|
81
|
+
|
|
82
|
+
### Help Text & Tooltips
|
|
83
|
+
**Bad**: "This is the username field"
|
|
84
|
+
**Good**: "Choose a username. You can change this later in Settings."
|
|
85
|
+
|
|
86
|
+
**Principles**:
|
|
87
|
+
- Add value (don't just repeat the label)
|
|
88
|
+
- Answer the implicit question ("What is this?" or "Why do you need this?")
|
|
89
|
+
- Keep it brief but complete
|
|
90
|
+
- Link to detailed docs if needed
|
|
91
|
+
|
|
92
|
+
### Empty States
|
|
93
|
+
**Bad**: "No items"
|
|
94
|
+
**Good**: "No projects yet. Create your first project to get started."
|
|
95
|
+
|
|
96
|
+
**Principles**:
|
|
97
|
+
- Explain why it's empty (if not obvious)
|
|
98
|
+
- Show next action clearly
|
|
99
|
+
- Make it welcoming, not dead-end
|
|
100
|
+
|
|
101
|
+
### Success Messages
|
|
102
|
+
**Bad**: "Success"
|
|
103
|
+
**Good**: "Settings saved! Your changes will take effect immediately."
|
|
104
|
+
|
|
105
|
+
**Principles**:
|
|
106
|
+
- Confirm what happened
|
|
107
|
+
- Explain what happens next (if relevant)
|
|
108
|
+
- Be brief but complete
|
|
109
|
+
- Match the user's emotional moment (celebrate big wins)
|
|
110
|
+
|
|
111
|
+
### Loading States
|
|
112
|
+
**Bad**: "Loading..." (for 30+ seconds)
|
|
113
|
+
**Good**: "Analyzing your data... this usually takes 30-60 seconds"
|
|
114
|
+
|
|
115
|
+
**Principles**:
|
|
116
|
+
- Set expectations (how long?)
|
|
117
|
+
- Explain what's happening (when it's not obvious)
|
|
118
|
+
- Show progress when possible
|
|
119
|
+
- Offer escape hatch if appropriate ("Cancel")
|
|
120
|
+
|
|
121
|
+
### Confirmation Dialogs
|
|
122
|
+
**Bad**: "Are you sure?"
|
|
123
|
+
**Good**: "Delete 'Project Alpha'? This can't be undone."
|
|
124
|
+
|
|
125
|
+
**Principles**:
|
|
126
|
+
- State the specific action
|
|
127
|
+
- Explain consequences (especially for destructive actions)
|
|
128
|
+
- Use clear button labels ("Delete project" not "Yes")
|
|
129
|
+
- Don't overuse confirmations (only for risky actions)
|
|
130
|
+
|
|
131
|
+
### Navigation & Wayfinding
|
|
132
|
+
**Bad**: Generic labels like "Items" | "Things" | "Stuff"
|
|
133
|
+
**Good**: Specific labels like "Your projects" | "Team members" | "Settings"
|
|
134
|
+
|
|
135
|
+
**Principles**:
|
|
136
|
+
- Be specific and descriptive
|
|
137
|
+
- Use language users understand (not internal jargon)
|
|
138
|
+
- Make hierarchy clear
|
|
139
|
+
- Consider information scent (breadcrumbs, current location)
|
|
140
|
+
|
|
141
|
+
## Apply Clarity Principles
|
|
142
|
+
|
|
143
|
+
Every piece of copy should follow these rules:
|
|
144
|
+
|
|
145
|
+
1. **Be specific**: "Enter email" not "Enter value"
|
|
146
|
+
2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity)
|
|
147
|
+
3. **Be active**: "Save changes" not "Changes will be saved"
|
|
148
|
+
4. **Be human**: "Oops, something went wrong" not "System error encountered"
|
|
149
|
+
5. **Tell users what to do**, not just what happened
|
|
150
|
+
6. **Be consistent**: Use same terms throughout (don't vary for variety)
|
|
151
|
+
|
|
152
|
+
**NEVER**:
|
|
153
|
+
- Use jargon without explanation
|
|
154
|
+
- Blame users ("You made an error" → "This field is required")
|
|
155
|
+
- Be vague ("Something went wrong" without explanation)
|
|
156
|
+
- Use passive voice unnecessarily
|
|
157
|
+
- Write overly long explanations (be concise)
|
|
158
|
+
- Use humor for errors (be empathetic instead)
|
|
159
|
+
- Assume technical knowledge
|
|
160
|
+
- Vary terminology (pick one term and stick with it)
|
|
161
|
+
- Repeat information (headers restating intros, redundant explanations)
|
|
162
|
+
- Use placeholders as the only labels (they disappear when users type)
|
|
163
|
+
|
|
164
|
+
## Verify Improvements
|
|
165
|
+
|
|
166
|
+
Test that copy improvements work:
|
|
167
|
+
|
|
168
|
+
- **Comprehension**: Can users understand without context?
|
|
169
|
+
- **Actionability**: Do users know what to do next?
|
|
170
|
+
- **Brevity**: Is it as short as possible while remaining clear?
|
|
171
|
+
- **Consistency**: Does it match terminology elsewhere?
|
|
172
|
+
- **Tone**: Is it appropriate for the situation?
|
|
173
|
+
|
|
174
|
+
When the copy reads cleanly, hand off to `/impeccable polish` for the final pass.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Reference Material
|
|
179
|
+
|
|
180
|
+
The sections below were previously `ux-writing.md` and live inline now so the clarify flow has its deep UX-writing reference in one place.
|
|
181
|
+
|
|
182
|
+
### UX Writing
|
|
183
|
+
|
|
184
|
+
#### The Button Label Problem
|
|
185
|
+
|
|
186
|
+
**Never use "OK", "Submit", or "Yes/No".** These are lazy and ambiguous. Use specific verb + object patterns:
|
|
187
|
+
|
|
188
|
+
| Bad | Good | Why |
|
|
189
|
+
|-----|------|-----|
|
|
190
|
+
| OK | Save changes | Says what will happen |
|
|
191
|
+
| Submit | Create account | Outcome-focused |
|
|
192
|
+
| Yes | Delete message | Confirms the action |
|
|
193
|
+
| Cancel | Keep editing | Clarifies what "cancel" means |
|
|
194
|
+
| Click here | Download PDF | Describes the destination |
|
|
195
|
+
|
|
196
|
+
**For destructive actions**, name the destruction:
|
|
197
|
+
- "Delete" not "Remove" (delete is permanent, remove implies recoverable)
|
|
198
|
+
- "Delete 5 items" not "Delete selected" (show the count)
|
|
199
|
+
|
|
200
|
+
#### Error Messages: The Formula
|
|
201
|
+
|
|
202
|
+
Every error message should answer: (1) What happened? (2) Why? (3) How to fix it? Example: "Email address isn't valid. Please include an @ symbol." not "Invalid input".
|
|
203
|
+
|
|
204
|
+
##### Error Message Templates
|
|
205
|
+
|
|
206
|
+
| Situation | Template |
|
|
207
|
+
|-----------|----------|
|
|
208
|
+
| **Format error** | "[Field] needs to be [format]. Example: [example]" |
|
|
209
|
+
| **Missing required** | "Please enter [what's missing]" |
|
|
210
|
+
| **Permission denied** | "You don't have access to [thing]. [What to do instead]" |
|
|
211
|
+
| **Network error** | "We couldn't reach [thing]. Check your connection and [action]." |
|
|
212
|
+
| **Server error** | "Something went wrong on our end. We're looking into it. [Alternative action]" |
|
|
213
|
+
|
|
214
|
+
##### Don't Blame the User
|
|
215
|
+
|
|
216
|
+
Reframe errors: "Please enter a date in MM/DD/YYYY format" not "You entered an invalid date".
|
|
217
|
+
|
|
218
|
+
#### Empty States Are Opportunities
|
|
219
|
+
|
|
220
|
+
Empty states are onboarding moments: (1) Acknowledge briefly, (2) Explain the value of filling it, (3) Provide a clear action. "No projects yet. Create your first one to get started." not just "No items".
|
|
221
|
+
|
|
222
|
+
#### Voice vs Tone
|
|
223
|
+
|
|
224
|
+
**Voice** is your brand's personality, consistent everywhere.
|
|
225
|
+
**Tone** adapts to the moment.
|
|
226
|
+
|
|
227
|
+
| Moment | Tone Shift |
|
|
228
|
+
|--------|------------|
|
|
229
|
+
| Success | Celebratory, brief: "Done! Your changes are live." |
|
|
230
|
+
| Error | Empathetic, helpful: "That didn't work. Here's what to try..." |
|
|
231
|
+
| Loading | Reassuring: "Saving your work..." |
|
|
232
|
+
| Destructive confirm | Serious, clear: "Delete this project? This can't be undone." |
|
|
233
|
+
|
|
234
|
+
**Never use humor for errors.** Users are already frustrated. Be helpful, not cute.
|
|
235
|
+
|
|
236
|
+
#### Writing for Accessibility
|
|
237
|
+
|
|
238
|
+
**Link text** must have standalone meaning: "View pricing plans" not "Click here". **Alt text** describes information, not the image: "Revenue increased 40% in Q4" not "Chart". Use `alt=""` for decorative images. **Icon buttons** need `aria-label` for screen reader context.
|
|
239
|
+
|
|
240
|
+
#### Writing for Translation
|
|
241
|
+
|
|
242
|
+
##### Plan for Expansion
|
|
243
|
+
|
|
244
|
+
German text is ~30% longer than English. Allocate space:
|
|
245
|
+
|
|
246
|
+
| Language | Expansion |
|
|
247
|
+
|----------|-----------|
|
|
248
|
+
| German | +30% |
|
|
249
|
+
| French | +20% |
|
|
250
|
+
| Finnish | +30-40% |
|
|
251
|
+
| Chinese | -30% (fewer chars, but same width) |
|
|
252
|
+
|
|
253
|
+
##### Translation-Friendly Patterns
|
|
254
|
+
|
|
255
|
+
Keep numbers separate ("New messages: 3" not "You have 3 new messages"). Use full sentences as single strings (word order varies by language). Avoid abbreviations ("5 minutes ago" not "5 mins ago"). Give translators context about where strings appear.
|
|
256
|
+
|
|
257
|
+
#### Consistency: The Terminology Problem
|
|
258
|
+
|
|
259
|
+
Pick one term and stick with it:
|
|
260
|
+
|
|
261
|
+
| Inconsistent | Consistent |
|
|
262
|
+
|--------------|------------|
|
|
263
|
+
| Delete / Remove / Trash | Delete |
|
|
264
|
+
| Settings / Preferences / Options | Settings |
|
|
265
|
+
| Sign in / Log in / Enter | Sign in |
|
|
266
|
+
| Create / Add / New | Create |
|
|
267
|
+
|
|
268
|
+
Build a terminology glossary and enforce it. Variety creates confusion.
|
|
269
|
+
|
|
270
|
+
#### Avoid Redundant Copy
|
|
271
|
+
|
|
272
|
+
If the heading explains it, the intro is redundant. If the button is clear, don't explain it again. Say it once, say it well.
|
|
273
|
+
|
|
274
|
+
#### Loading States
|
|
275
|
+
|
|
276
|
+
Be specific: "Saving your draft..." not "Loading...". For long waits, set expectations ("This usually takes 30 seconds") or show progress.
|
|
277
|
+
|
|
278
|
+
#### Confirmation Dialogs: Use Sparingly
|
|
279
|
+
|
|
280
|
+
Most confirmation dialogs are design failures; consider undo instead. When you must confirm: name the action, explain consequences, use specific button labels ("Delete project" / "Keep project", not "Yes" / "No").
|
|
281
|
+
|
|
282
|
+
#### Form Instructions
|
|
283
|
+
|
|
284
|
+
Show format with placeholders, not instructions. For non-obvious fields, explain why you're asking.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
**Avoid**: Jargon without explanation. Blaming users ("You made an error" → "This field is required"). Vague errors ("Something went wrong"). Varying terminology for variety. Humor for errors.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Codex: Visual Direction & Asset Production
|
|
2
|
+
|
|
3
|
+
This file is loaded by `/impeccable craft` when the harness has native image generation (currently Codex via `image_gen`). Other harnesses skip it. It covers the two craft steps that depend on real image generation: landing the visual direction, and producing the raster assets the implementation will compose.
|
|
4
|
+
|
|
5
|
+
Read this *before* generating any images. The order matters, and the per-step user pauses are what keep generated imagery from drifting away from the brief.
|
|
6
|
+
|
|
7
|
+
### Four stop points before code
|
|
8
|
+
|
|
9
|
+
Steps A through D each end with the user. Do not advance past any of them on your own read of the situation.
|
|
10
|
+
|
|
11
|
+
1. **STOP after Step A questions.** Wait for answers.
|
|
12
|
+
2. **STOP after Step B palette generation.** Wait for "confirm palette."
|
|
13
|
+
3. **STOP after Step C mocks.** Wait for direction approval or delegation.
|
|
14
|
+
4. **Only after Step D approves a direction** do you return to craft.md Step 4 and write code.
|
|
15
|
+
|
|
16
|
+
Prior shape approval does **not** satisfy any of these. Shape's "confirm or override" advances you into Step A; it is not a substitute for it.
|
|
17
|
+
|
|
18
|
+
## Step A: Explore Directions with the User
|
|
19
|
+
|
|
20
|
+
Before generating anything, run a brief direction conversation grounded in the shape brief.
|
|
21
|
+
|
|
22
|
+
**Step A is required even when shape just produced a confirmed brief.** The shape questions and Step A questions cover different ground: shape pins purpose, content, scope; Step A pins palette, atmosphere, and named visual references for the comps you're about to generate. The only time you can skip Step A is when the user has already answered these exact palette/atmosphere/reference questions in the same session.
|
|
23
|
+
|
|
24
|
+
Ask **2-3 targeted questions** about visual lane, color strategy, atmosphere, and named anchor references. Don't enumerate generic menus; tie each question to the shape brief's answers. Example shape-grounded questions:
|
|
25
|
+
|
|
26
|
+
- "Brief says 'specimen-page restraint.' Are we closer to a quiet typographic page or a wider editorial spread with hero imagery?"
|
|
27
|
+
- "Palette strategy from shape was 'Committed.' Which one color carries the surface (a brand-driven pick rather than a default warm-or-cool framing)? (And no, the answer isn't a cream/sand body bg; that's the saturated AI default.)"
|
|
28
|
+
|
|
29
|
+
**STOP and wait for answers.** These pin the palette before any pixel gets generated. Do not proceed to Step B until the user has responded.
|
|
30
|
+
|
|
31
|
+
## Step B: Generate the Brand Palette First
|
|
32
|
+
|
|
33
|
+
Generate **one** palette artifact before any mocks. This is a small, focused image: typography pairing on the chosen background, primary + accent color swatches, one signature ornament or motif. Single image, single pass.
|
|
34
|
+
|
|
35
|
+
Why palette first: mocks generated against a vague color sense produce noise that drowns out the structural decisions. A confirmed palette is the first concrete contract for everything downstream.
|
|
36
|
+
|
|
37
|
+
Show the palette to the user. Ask one question: "This is the palette I'm locking in for the mocks. Confirm, or call out what to shift?"
|
|
38
|
+
|
|
39
|
+
**STOP and wait for confirmation.** Do not generate mocks against an unconfirmed palette. "Probably good enough" is the wrong call here; the palette is the contract for everything downstream.
|
|
40
|
+
|
|
41
|
+
## Step C: Generate 1-3 Visual Mocks Against the Palette
|
|
42
|
+
|
|
43
|
+
Once the palette is confirmed, generate **1 to 3** high-fidelity north-star comps. Each mock must use the confirmed palette and typography. Mocks differ in *structural* direction (hierarchy, topology, density, composition), not in color or motif.
|
|
44
|
+
|
|
45
|
+
- Brand work: push visual identity, composition, mood, and signature motifs.
|
|
46
|
+
- Product work: push hierarchy, topology, density, tone, grounded in realistic product structure.
|
|
47
|
+
- Landing pages and long-form brand surfaces: show enough of the second fold to establish the system beyond the hero.
|
|
48
|
+
|
|
49
|
+
Use the `image_gen` tool directly (or via the imagegen skill when available). Don't ask the user to install anything.
|
|
50
|
+
|
|
51
|
+
## Step D: Approval Loop
|
|
52
|
+
|
|
53
|
+
Show the comps. Ask what carries forward. Iterate until **one direction is approved** or the user explicitly delegates.
|
|
54
|
+
|
|
55
|
+
**STOP and wait for the approval or the delegation.** Do not begin Step E or return to craft.md Step 4 until a single direction is named. If the user delegates, pick the strongest direction and explain it from the brief, not personal taste.
|
|
56
|
+
|
|
57
|
+
Before moving to assets, summarize what to carry into code and what *not* to literalize from the mock. This is the handoff between visual exploration and semantic implementation.
|
|
58
|
+
|
|
59
|
+
## Step E: Mock Fidelity Inventory
|
|
60
|
+
|
|
61
|
+
Inventory the approved mock's major visible ingredients. For each, decide implementation: semantic HTML/CSS/SVG, generated raster, sourced raster, icon library, canvas/WebGL, or accepted omission.
|
|
62
|
+
|
|
63
|
+
Common ingredients to inventory:
|
|
64
|
+
|
|
65
|
+
- Hero silhouette and dominant composition
|
|
66
|
+
- Signature motifs (planets, devices, portraits, charts, route lines, insets, badges, etc.)
|
|
67
|
+
- Nav and primary CTA treatment
|
|
68
|
+
- Section sequence, especially the second fold
|
|
69
|
+
- Image-native content the concept depends on
|
|
70
|
+
- Typography, density, color/material treatment, motion cues
|
|
71
|
+
|
|
72
|
+
Treat the mock as a north star, not a screenshot to trace. Don't rasterize core UI text. But if the live result lacks the mock's major ingredients, the implementation is wrong.
|
|
73
|
+
|
|
74
|
+
If a photographic, architectural, product, or place-led mock becomes generic CSS scenery, decorative diagrams, bullets, or copy, stop and fix it. That's a broken implementation, not a harmless interpretation.
|
|
75
|
+
|
|
76
|
+
Don't substitute a different hero composition or visual driver post-approval without user sign-off.
|
|
77
|
+
|
|
78
|
+
## Step F: Asset Slicing via the Asset Producer
|
|
79
|
+
|
|
80
|
+
Raster ingredients identified in Step E need clean production assets. Use the bundled `impeccable_asset_producer` subagent rather than producing inline.
|
|
81
|
+
|
|
82
|
+
Spawn it as a scoped subagent. If you do not have explicit permission to use agents, stop and ask:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
Asset production will work better as a scoped subagent job. Should I spawn the Impeccable asset producer subagent for this step?
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Pass to the agent:
|
|
89
|
+
|
|
90
|
+
- Approved mock path or screenshot reference
|
|
91
|
+
- Crop paths or a contact sheet with crop ids
|
|
92
|
+
- Output directory
|
|
93
|
+
- Required dimensions, format, transparency needs
|
|
94
|
+
- Avoid list
|
|
95
|
+
- Notes on what should remain semantic HTML/CSS/SVG instead of raster
|
|
96
|
+
|
|
97
|
+
Attach image generation capability to the spawned agent when the harness supports it. Do **not** load image-generation reference material into the parent thread.
|
|
98
|
+
|
|
99
|
+
Inline asset production is allowed only if the user declines subagents, the harness cannot spawn the authorized agent, or the user explicitly asks for single-thread mode.
|
|
100
|
+
|
|
101
|
+
Prefer HTML/CSS/SVG/canvas when they can credibly reproduce an ingredient; reach for real, generated, or stock imagery when the mock or subject matter calls for actual visual content.
|
|
102
|
+
|
|
103
|
+
## After This File
|
|
104
|
+
|
|
105
|
+
Once Steps A through F are complete, return to `craft.md` Step 5 (Build to Production Quality). The implementation builds against the confirmed palette, approved mock, and the assets the producer wrote.
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
> **Additional context needed**: existing brand colors.
|
|
2
|
+
|
|
3
|
+
Replace timid grayscale or single-accent designs with a strategic palette: pick a color strategy, choose a hue family that fits the brand, then apply color with intent. More color ≠ better. Strategic color beats rainbow vomit.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Register
|
|
8
|
+
|
|
9
|
+
Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule; that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it.
|
|
10
|
+
|
|
11
|
+
Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators. Not decoration. Every color has a consistent meaning across every screen.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Assess Color Opportunity
|
|
16
|
+
|
|
17
|
+
Analyze the current state and identify opportunities:
|
|
18
|
+
|
|
19
|
+
1. **Understand current state**:
|
|
20
|
+
- **Color absence**: Pure grayscale? Limited neutrals? One timid accent?
|
|
21
|
+
- **Missed opportunities**: Where could color add meaning, hierarchy, or delight?
|
|
22
|
+
- **Context**: What's appropriate for this domain and audience?
|
|
23
|
+
- **Brand**: Are there existing brand colors we should use?
|
|
24
|
+
|
|
25
|
+
2. **Identify where color adds value**:
|
|
26
|
+
- **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue)
|
|
27
|
+
- **Hierarchy**: Drawing attention to important elements
|
|
28
|
+
- **Categorization**: Different sections, types, or states
|
|
29
|
+
- **Emotional tone**: Warmth, energy, trust, creativity
|
|
30
|
+
- **Wayfinding**: Helping users navigate and understand structure
|
|
31
|
+
- **Delight**: Moments of visual interest and personality
|
|
32
|
+
|
|
33
|
+
If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
|
|
34
|
+
|
|
35
|
+
**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose.
|
|
36
|
+
|
|
37
|
+
## Plan Color Strategy
|
|
38
|
+
|
|
39
|
+
Create a purposeful color introduction plan:
|
|
40
|
+
|
|
41
|
+
- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals)
|
|
42
|
+
- **Dominant color**: Which color owns 60% of colored elements?
|
|
43
|
+
- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%)
|
|
44
|
+
- **Application strategy**: Where does each color appear and why?
|
|
45
|
+
|
|
46
|
+
**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more.
|
|
47
|
+
|
|
48
|
+
## Introduce Color Strategically
|
|
49
|
+
|
|
50
|
+
Add color systematically across these dimensions:
|
|
51
|
+
|
|
52
|
+
### Semantic Color
|
|
53
|
+
- **State indicators**:
|
|
54
|
+
- Success: Green tones (emerald, forest, mint)
|
|
55
|
+
- Error: Red/pink tones (rose, crimson, coral)
|
|
56
|
+
- Warning: Orange/amber tones
|
|
57
|
+
- Info: Blue tones (sky, ocean, indigo)
|
|
58
|
+
- Neutral: Gray/slate for inactive states
|
|
59
|
+
|
|
60
|
+
- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.)
|
|
61
|
+
- **Progress indicators**: Colored bars, rings, or charts showing completion or health
|
|
62
|
+
|
|
63
|
+
### Accent Color Application
|
|
64
|
+
- **Primary actions**: Color the most important buttons/CTAs
|
|
65
|
+
- **Links**: Add color to clickable text (maintain accessibility)
|
|
66
|
+
- **Icons**: Colorize key icons for recognition and personality
|
|
67
|
+
- **Headers/titles**: Add color to section headers or key labels
|
|
68
|
+
- **Hover states**: Introduce color on interaction
|
|
69
|
+
|
|
70
|
+
### Background & Surfaces
|
|
71
|
+
- **Tinted backgrounds**: If you replace pure gray, tint toward the brand hue, not toward a generic-warm-or-cool pair. The default-warm-tint (`oklch(97% 0.01 60)` and its neighbors) is now the AI cream/sand giveaway. Be specific to the brand or stay neutral.
|
|
72
|
+
- **Colored sections**: Use subtle background colors to separate areas
|
|
73
|
+
- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue)
|
|
74
|
+
- **Cards & surfaces**: Tint cards or surfaces toward the brand, not "for warmth" by reflex
|
|
75
|
+
|
|
76
|
+
**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales.
|
|
77
|
+
|
|
78
|
+
### Data Visualization
|
|
79
|
+
- **Charts & graphs**: Use color to encode categories or values
|
|
80
|
+
- **Heatmaps**: Color intensity shows density or importance
|
|
81
|
+
- **Comparison**: Color coding for different datasets or timeframes
|
|
82
|
+
|
|
83
|
+
### Borders & Accents
|
|
84
|
+
- **Hairline borders**: 1px colored borders on full perimeter (not side-stripes; see the absolute ban on `border-left/right > 1px`)
|
|
85
|
+
- **Underlines**: Color underlines for emphasis or active states
|
|
86
|
+
- **Dividers**: Subtle colored dividers instead of gray lines
|
|
87
|
+
- **Focus rings**: Colored focus indicators matching brand
|
|
88
|
+
- **Surface tints**: A 4-8% background wash of the accent color instead of a stripe
|
|
89
|
+
|
|
90
|
+
**NEVER**: `border-left` or `border-right` greater than 1px as a colored accent stripe. This is one of the three absolute bans in the parent skill. If you want to mark a card as "active" or "warning", use a full hairline border, a background tint, a leading glyph, or a numbered prefix. Not a side stripe.
|
|
91
|
+
|
|
92
|
+
### Typography Color
|
|
93
|
+
- **Colored headings**: Use brand colors for section headings (maintain contrast)
|
|
94
|
+
- **Highlight text**: Color for emphasis or categories
|
|
95
|
+
- **Labels & tags**: Small colored labels for metadata or categories
|
|
96
|
+
|
|
97
|
+
### Decorative Elements
|
|
98
|
+
- **Illustrations**: Add colored illustrations or icons
|
|
99
|
+
- **Shapes**: Geometric shapes in brand colors as background elements
|
|
100
|
+
- **Gradients**: Colorful gradient overlays or mesh backgrounds
|
|
101
|
+
- **Blobs/organic shapes**: Soft colored shapes for visual interest
|
|
102
|
+
|
|
103
|
+
## Balance & Refinement
|
|
104
|
+
|
|
105
|
+
Ensure color addition improves rather than overwhelms:
|
|
106
|
+
|
|
107
|
+
### Maintain Hierarchy
|
|
108
|
+
- **Dominant color** (60%): Primary brand color or most used accent
|
|
109
|
+
- **Secondary color** (30%): Supporting color for variety
|
|
110
|
+
- **Accent color** (10%): High contrast for key moments
|
|
111
|
+
- **Neutrals** (remaining): Gray/black/white for structure
|
|
112
|
+
|
|
113
|
+
### Accessibility
|
|
114
|
+
- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components)
|
|
115
|
+
- **Don't rely on color alone**: Use icons, labels, or patterns alongside color
|
|
116
|
+
- **Test for color blindness**: Verify red/green combinations work for all users
|
|
117
|
+
|
|
118
|
+
### Cohesion
|
|
119
|
+
- **Consistent palette**: Use colors from defined palette, not arbitrary choices
|
|
120
|
+
- **Systematic application**: Same color meanings throughout (green always = success)
|
|
121
|
+
- **Temperature consistency**: Warm palette stays warm, cool stays cool
|
|
122
|
+
|
|
123
|
+
**NEVER**:
|
|
124
|
+
- Use every color in the rainbow (choose 2-4 colors beyond neutrals)
|
|
125
|
+
- Apply color randomly without semantic meaning
|
|
126
|
+
- Put gray text on colored backgrounds. It looks washed out; use a darker shade of the background color or transparency instead
|
|
127
|
+
- Violate WCAG contrast requirements
|
|
128
|
+
- Use color as the only indicator (accessibility issue)
|
|
129
|
+
- Make everything colorful (defeats the purpose)
|
|
130
|
+
- Default to purple-blue gradients (AI slop aesthetic)
|
|
131
|
+
|
|
132
|
+
## Verify Color Addition
|
|
133
|
+
|
|
134
|
+
Test that colorization improves the experience:
|
|
135
|
+
|
|
136
|
+
- **Better hierarchy**: Does color guide attention appropriately?
|
|
137
|
+
- **Clearer meaning**: Does color help users understand states/categories?
|
|
138
|
+
- **More engaging**: Does the interface feel warmer and more inviting?
|
|
139
|
+
- **Still accessible**: Do all color combinations meet WCAG standards?
|
|
140
|
+
- **Not overwhelming**: Is color balanced and purposeful?
|
|
141
|
+
|
|
142
|
+
When the palette earns its place, hand off to `/impeccable polish` for the final pass.
|
|
143
|
+
|
|
144
|
+
## Live-mode signature params
|
|
145
|
+
|
|
146
|
+
When invoked from live mode, each variant MUST declare a `color-amount` param so the user can dial between a restrained accent and a drenched surface without regeneration. Author the variant's CSS against `var(--p-color-amount, 0.5)`, typically as the alpha multiplier on backgrounds, or as a scaling factor on the chroma axis in an OKLCH expression. 0 = neutral/monochrome, 1 = full saturation / dominant coverage.
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{"id":"color-amount","kind":"range","min":0,"max":1,"step":0.05,"default":0.5,"label":"Color amount"}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Layer 1-2 variant-specific params on top: palette selection (`steps` with named options), temperature warmth, or tint vs. true color. See `reference/live.md` for the full params contract.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Reference Material
|
|
157
|
+
|
|
158
|
+
The sections below were previously `color-and-contrast.md` and live inline now so the colorize flow has its deep color reference in one place.
|
|
159
|
+
|
|
160
|
+
### Color & Contrast
|
|
161
|
+
|
|
162
|
+
#### Color Spaces: Use OKLCH
|
|
163
|
+
|
|
164
|
+
**Stop using HSL.** Use OKLCH (or LCH) instead. It's perceptually uniform, meaning equal steps in lightness *look* equal, unlike HSL where 50% lightness in yellow looks bright while 50% in blue looks dark.
|
|
165
|
+
|
|
166
|
+
The OKLCH function takes three components: `oklch(lightness chroma hue)` where lightness is 0-100%, chroma is roughly 0-0.4, and hue is 0-360. To build a primary color and its lighter / darker variants, hold the chroma+hue roughly constant and vary the lightness, but **reduce chroma as you approach white or black**, because high chroma at extreme lightness looks garish.
|
|
167
|
+
|
|
168
|
+
The hue you pick is a brand decision and should not come from a default. Do not reach for blue (hue 250) or warm orange (hue 60) by reflex; those are the dominant AI-design defaults, not the right answer for any specific brand.
|
|
169
|
+
|
|
170
|
+
#### Building Functional Palettes
|
|
171
|
+
|
|
172
|
+
##### Tinted Neutrals
|
|
173
|
+
|
|
174
|
+
**Pure gray is dead.** A neutral with zero chroma feels lifeless next to a colored brand. Add a tiny chroma value (0.005-0.015) to all your neutrals, hued toward whatever your brand color is. The chroma is small enough not to read as "tinted" consciously, but it creates subconscious cohesion between brand color and UI surfaces.
|
|
175
|
+
|
|
176
|
+
The hue you tint toward should come from THIS project's brand, not from a "warm = friendly, cool = tech" formula. If your brand color is teal, your neutrals lean toward teal. If your brand color is amber, they lean toward amber. The point is cohesion with the SPECIFIC brand, not a stock palette.
|
|
177
|
+
|
|
178
|
+
**Avoid** the trap of always tinting toward warm orange or always tinting toward cool blue. Those are the two laziest defaults and they create their own monoculture across projects.
|
|
179
|
+
|
|
180
|
+
##### Palette Structure
|
|
181
|
+
|
|
182
|
+
A complete system needs:
|
|
183
|
+
|
|
184
|
+
| Role | Purpose | Example |
|
|
185
|
+
|------|---------|---------|
|
|
186
|
+
| **Primary** | Brand, CTAs, key actions | 1 color, 3-5 shades |
|
|
187
|
+
| **Neutral** | Text, backgrounds, borders | 9-11 shade scale |
|
|
188
|
+
| **Semantic** | Success, error, warning, info | 4 colors, 2-3 shades each |
|
|
189
|
+
| **Surface** | Cards, modals, overlays | 2-3 elevation levels |
|
|
190
|
+
|
|
191
|
+
**Skip secondary/tertiary unless you need them.** Most apps work fine with one accent color. Adding more creates decision fatigue and visual noise.
|
|
192
|
+
|
|
193
|
+
##### The 60-30-10 Rule (Applied Correctly)
|
|
194
|
+
|
|
195
|
+
This rule is about **visual weight**, not pixel count:
|
|
196
|
+
|
|
197
|
+
- **60%**: Neutral backgrounds, white space, base surfaces
|
|
198
|
+
- **30%**: Secondary colors: text, borders, inactive states
|
|
199
|
+
- **10%**: Accent: CTAs, highlights, focus states
|
|
200
|
+
|
|
201
|
+
The common mistake: using the accent color everywhere because it's "the brand color." Accent colors work *because* they're rare. Overuse kills their power.
|
|
202
|
+
|
|
203
|
+
#### Contrast & Accessibility
|
|
204
|
+
|
|
205
|
+
##### WCAG Requirements
|
|
206
|
+
|
|
207
|
+
| Content Type | AA Minimum | AAA Target |
|
|
208
|
+
|--------------|------------|------------|
|
|
209
|
+
| Body text | 4.5:1 | 7:1 |
|
|
210
|
+
| Large text (18px+ or 14px bold) | 3:1 | 4.5:1 |
|
|
211
|
+
| UI components, icons | 3:1 | 4.5:1 |
|
|
212
|
+
| Non-essential decorations | None | None |
|
|
213
|
+
|
|
214
|
+
##### Dangerous Color Combinations
|
|
215
|
+
|
|
216
|
+
These commonly fail contrast or cause readability issues:
|
|
217
|
+
|
|
218
|
+
- Light gray text on white (the #1 accessibility fail)
|
|
219
|
+
- Red text on green background (or vice versa): 8% of men can't distinguish these
|
|
220
|
+
- Blue text on red background (vibrates visually)
|
|
221
|
+
- Yellow text on white (almost always fails)
|
|
222
|
+
- Thin light text on images (unpredictable contrast)
|
|
223
|
+
|
|
224
|
+
##### Testing
|
|
225
|
+
|
|
226
|
+
Don't trust your eyes. Use tools:
|
|
227
|
+
|
|
228
|
+
- [WebAIM Contrast Checker](https://webaim.org/resources/contrastchecker/)
|
|
229
|
+
- Browser DevTools → Rendering → Emulate vision deficiencies
|
|
230
|
+
- [Polypane](https://polypane.app/) for real-time testing
|
|
231
|
+
|
|
232
|
+
#### Theming: Light & Dark Mode
|
|
233
|
+
|
|
234
|
+
##### Dark Mode Is Not Inverted Light Mode
|
|
235
|
+
|
|
236
|
+
You can't just swap colors. Dark mode requires different design decisions:
|
|
237
|
+
|
|
238
|
+
| Light Mode | Dark Mode |
|
|
239
|
+
|------------|-----------|
|
|
240
|
+
| Shadows for depth | Lighter surfaces for depth (no shadows) |
|
|
241
|
+
| Dark text on light | Light text on dark (reduce font weight) |
|
|
242
|
+
| Vibrant accents | Desaturate accents slightly |
|
|
243
|
+
| White backgrounds | Either pure black or a deep surface that fits the brand (a brand-tinted near-black at oklch 12-18% works too) |
|
|
244
|
+
|
|
245
|
+
In dark mode, depth comes from surface lightness, not shadow. Build a 3-step surface scale where higher elevations are lighter (e.g. 15% / 20% / 25% lightness). Use the SAME hue and chroma as your brand color (whatever it is for THIS project; do not reach for blue) and only vary the lightness. Reduce body text weight slightly (e.g. 350 instead of 400) because light text on dark reads as heavier than dark text on light.
|
|
246
|
+
|
|
247
|
+
##### Token Hierarchy
|
|
248
|
+
|
|
249
|
+
Use two layers: primitive tokens (`--blue-500`) and semantic tokens (`--color-primary: var(--blue-500)`). For dark mode, only redefine the semantic layer; primitives stay the same.
|
|
250
|
+
|
|
251
|
+
#### Alpha Is A Design Smell
|
|
252
|
+
|
|
253
|
+
Heavy use of transparency (rgba, hsla) usually means an incomplete palette. Alpha creates unpredictable contrast, performance overhead, and inconsistency. Define explicit overlay colors for each context instead. Exception: focus rings and interactive states where see-through is needed.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
**Avoid**: Relying on color alone to convey information. Creating palettes without clear roles for each color. Skipping color blindness testing (8% of men affected).
|