aiwg 2026.3.0 → 2026.3.2
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/CLAUDE.md +22 -5
- package/agentic/code/addons/color-palette/README.md +81 -0
- package/agentic/code/addons/color-palette/manifest.json +32 -0
- package/agentic/code/addons/color-palette/rules/color-output-format.md +70 -0
- package/agentic/code/addons/color-palette/skills/color-accessibility.md +188 -0
- package/agentic/code/addons/color-palette/skills/color-palette.md +372 -0
- package/agentic/code/addons/color-palette/skills/color-trends.md +172 -0
- package/agentic/code/addons/color-palette/skills/manifest.json +22 -0
- package/agentic/code/addons/color-palette/templates/palette-report.md +82 -0
- package/agentic/code/addons/color-palette/templates/trend-report.md +104 -0
- package/agentic/code/frameworks/forensics-complete/agents/acquisition-agent.md +107 -0
- package/agentic/code/frameworks/forensics-complete/agents/container-analyst.md +281 -8
- package/agentic/code/frameworks/forensics-complete/agents/log-analyst.md +89 -11
- package/agentic/code/frameworks/forensics-complete/agents/network-analyst.md +201 -0
- package/agentic/code/frameworks/forensics-complete/agents/persistence-hunter.md +301 -0
- package/agentic/code/frameworks/forensics-complete/agents/triage-agent.md +187 -0
- package/agentic/code/frameworks/forensics-complete/commands/forensics-acquire.md +50 -3
- package/agentic/code/frameworks/forensics-complete/commands/forensics-investigate.md +96 -0
- package/agentic/code/frameworks/forensics-complete/commands/forensics-triage.md +87 -0
- package/agentic/code/frameworks/forensics-complete/skills/container-forensics/SKILL.md +67 -19
- package/agentic/code/frameworks/forensics-complete/skills/evidence-preservation/SKILL.md +22 -4
- package/agentic/code/frameworks/forensics-complete/skills/log-analysis/SKILL.md +27 -2
- package/agentic/code/frameworks/sdlc-complete/README.md +1 -1
- package/agentic/code/frameworks/sdlc-complete/agents/context-librarian.md +11 -0
- package/agentic/code/frameworks/sdlc-complete/agents/dead-code-analyzer.md +190 -0
- package/agentic/code/frameworks/sdlc-complete/agents/manifest.json +1 -0
- package/agentic/code/frameworks/sdlc-complete/agents/requirements-analyst.md +11 -0
- package/agentic/code/frameworks/sdlc-complete/agents/security-architect.md +12 -0
- package/agentic/code/frameworks/sdlc-complete/agents/test-architect.md +12 -0
- package/agentic/code/frameworks/sdlc-complete/agents/traceability-manager.md +11 -0
- package/agentic/code/frameworks/sdlc-complete/commands/build-artifact-index.md +50 -11
- package/agentic/code/frameworks/sdlc-complete/commands/cleanup-audit.md +220 -0
- package/agentic/code/frameworks/sdlc-complete/rules/RULES-INDEX.md +16 -5
- package/agentic/code/frameworks/sdlc-complete/rules/artifact-discovery.md +154 -0
- package/agentic/code/frameworks/sdlc-complete/rules/manifest.json +8 -0
- package/agentic/code/frameworks/sdlc-complete/skills/artifact-lookup/SKILL.md +120 -0
- package/agentic/code/frameworks/sdlc-complete/skills/cleanup-audit/SKILL.md +115 -0
- package/agentic/code/frameworks/sdlc-complete/skills/manifest.json +70 -0
- package/agentic/code/frameworks/sdlc-complete/skills/traceability-check/SKILL.md +60 -35
- package/bin/aiwg.mjs +26 -3
- package/docs/cli-reference.md +249 -4
- package/docs/development/aiwg-development-guide.md +75 -0
- package/docs/development/dev-testing.md +59 -0
- package/docs/development/skill-inventory.md +25 -5
- package/docs/how-it-works.md +320 -0
- package/docs/overrides/styles.css +172 -0
- package/docs/releases/_manifest.json +1 -0
- package/docs/releases/v2026.3.1-announcement.md +134 -0
- package/docs/releases/v2026.3.2-announcement.md +104 -0
- package/package.json +1 -1
- package/src/artifacts/cli.ts +227 -0
- package/src/artifacts/dep-graph.ts +185 -0
- package/src/artifacts/index-builder.ts +347 -0
- package/src/artifacts/index-reader.ts +130 -0
- package/src/artifacts/query-engine.ts +178 -0
- package/src/artifacts/stats.ts +193 -0
- package/src/artifacts/types.ts +259 -0
- package/src/channel/manager.mjs +74 -0
- package/src/cli/handlers/index.ts +4 -1
- package/src/cli/handlers/ralph-launcher.ts +167 -3
- package/src/cli/handlers/subcommands.ts +34 -0
- package/src/cli/handlers/types.ts +2 -1
- package/src/cli/handlers/utilities.ts +175 -16
- package/src/cli/handlers/version.ts +1 -1
- package/src/extensions/commands/definitions.ts +82 -5
- package/src/smiths/platform-paths.ts +1 -1
- package/tools/agents/deploy-agents.mjs +96 -6
- package/tools/ralph-external/orchestrator.mjs +51 -20
package/CLAUDE.md
CHANGED
|
@@ -39,7 +39,7 @@ src/ # CLI and MCP server implementation
|
|
|
39
39
|
test/ # Test suites and fixtures
|
|
40
40
|
tools/ # Build and deployment scripts
|
|
41
41
|
docs/ # Documentation
|
|
42
|
-
├── cli-reference.md # All
|
|
42
|
+
├── cli-reference.md # All 44 CLI commands
|
|
43
43
|
├── extensions/ # Extension system docs
|
|
44
44
|
│ ├── overview.md
|
|
45
45
|
│ ├── creating-extensions.md
|
|
@@ -128,7 +128,7 @@ aiwg new my-project # Scaffold new project
|
|
|
128
128
|
aiwg help # Show all commands
|
|
129
129
|
aiwg doctor # Check installation health
|
|
130
130
|
|
|
131
|
-
# See @docs/cli-reference.md for all
|
|
131
|
+
# See @docs/cli-reference.md for all 47 commands
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
## Project Artifacts (.aiwg/)
|
|
@@ -177,9 +177,9 @@ AIWG uses a unified extension system for all extension types:
|
|
|
177
177
|
- `@docs/extensions/creating-extensions.md` - Build custom extensions
|
|
178
178
|
- `@docs/extensions/extension-types.md` - Complete type reference
|
|
179
179
|
- `@src/extensions/types.ts` - TypeScript type definitions
|
|
180
|
-
- `@src/extensions/commands/definitions.ts` - All
|
|
180
|
+
- `@src/extensions/commands/definitions.ts` - All 47 command definitions
|
|
181
181
|
|
|
182
|
-
## CLI Commands (
|
|
182
|
+
## CLI Commands (47 Total)
|
|
183
183
|
|
|
184
184
|
**See `@docs/cli-reference.md` for complete documentation.**
|
|
185
185
|
|
|
@@ -197,10 +197,12 @@ AIWG uses a unified extension system for all extension types:
|
|
|
197
197
|
| **Utility** (3) | prefill-cards, contribute-start, validate-metadata |
|
|
198
198
|
| **Plugin** (5) | install-plugin, uninstall-plugin, plugin-status, package-plugin, package-all-plugins |
|
|
199
199
|
| **Scaffolding** (7) | add-agent, add-command, add-skill, add-template, scaffold-addon, scaffold-extension, scaffold-framework |
|
|
200
|
-
| **Ralph** (
|
|
200
|
+
| **Ralph** (7) | ralph, ralph-status, ralph-abort, ralph-resume, ralph-external, ralph-memory, ralph-config |
|
|
201
201
|
| **Metrics** (3) | cost-report, cost-history, metrics-tokens |
|
|
202
202
|
| **Documentation** (1) | doc-sync |
|
|
203
203
|
| **SDLC Orchestration** (1) | sdlc-accelerate |
|
|
204
|
+
| **Code Analysis** (1) | cleanup-audit |
|
|
205
|
+
| **Index** (1) | index (build, query, deps, stats) |
|
|
204
206
|
| **Reproducibility** (4) | execution-mode, snapshot, checkpoint, reproducibility-validate |
|
|
205
207
|
|
|
206
208
|
### Quick Reference
|
|
@@ -242,6 +244,9 @@ aiwg ralph "Fix all tests" --completion "npm test passes"
|
|
|
242
244
|
aiwg ralph-status # Show loop status
|
|
243
245
|
aiwg ralph-abort # Stop loop
|
|
244
246
|
aiwg ralph-resume # Resume paused loop
|
|
247
|
+
aiwg ralph-external "task" # Crash-resilient external loop
|
|
248
|
+
aiwg ralph-memory list # Show debug memory entries
|
|
249
|
+
aiwg ralph-config show # Show Ralph configuration
|
|
245
250
|
|
|
246
251
|
# Metrics
|
|
247
252
|
aiwg cost-report # Show cost report for session
|
|
@@ -258,6 +263,13 @@ aiwg sdlc-accelerate "Project description" # Idea to construction-ready
|
|
|
258
263
|
aiwg sdlc-accelerate --from-codebase . # From existing code
|
|
259
264
|
aiwg sdlc-accelerate --resume # Resume pipeline
|
|
260
265
|
|
|
266
|
+
# Artifact index
|
|
267
|
+
aiwg index build # Build/rebuild artifact index
|
|
268
|
+
aiwg index build --force --verbose # Full rebuild with progress
|
|
269
|
+
aiwg index query "authentication" --json # Search artifacts
|
|
270
|
+
aiwg index deps .aiwg/requirements/UC-001.md --json # Show dependencies
|
|
271
|
+
aiwg index stats --json # Index statistics
|
|
272
|
+
|
|
261
273
|
# Reproducibility
|
|
262
274
|
aiwg execution-mode # Show/set execution mode
|
|
263
275
|
aiwg snapshot # Create execution snapshot
|
|
@@ -351,6 +363,11 @@ aiwg validate-metadata
|
|
|
351
363
|
|
|
352
364
|
# Check installation health
|
|
353
365
|
aiwg doctor
|
|
366
|
+
|
|
367
|
+
# Test local framework changes (see docs/development/dev-testing.md)
|
|
368
|
+
aiwg --use-dev # Point CLI at this repo
|
|
369
|
+
aiwg use all # Deploy from local source
|
|
370
|
+
aiwg --use-stable # Switch back to npm package
|
|
354
371
|
```
|
|
355
372
|
|
|
356
373
|
## Support
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Color Palette Addon
|
|
2
|
+
|
|
3
|
+
Standalone addon for color palette selection, analysis, and trend research. Helps users explore, evaluate, and select desirable color palettes using color theory fundamentals, current trend research, and cultural context from architecture, film, and design.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
aiwg use color-palette
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Skills
|
|
12
|
+
|
|
13
|
+
| Skill | Purpose |
|
|
14
|
+
|-------|---------|
|
|
15
|
+
| `color-palette` | Generate, analyze, compare, export, and suggest palettes |
|
|
16
|
+
| `color-trends` | Research current color trends (Pantone, architecture, film, design) |
|
|
17
|
+
| `color-accessibility` | WCAG accessibility analysis and contrast scoring |
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Generate a palette from a seed color
|
|
23
|
+
/color-palette generate --seed "#2D5A27" --harmony triadic
|
|
24
|
+
|
|
25
|
+
# Research current color trends
|
|
26
|
+
/color-palette trends --category film
|
|
27
|
+
|
|
28
|
+
# Analyze an existing palette
|
|
29
|
+
/color-palette analyze --palette "#1a1a2e,#16213e,#0f3460,#e94560"
|
|
30
|
+
|
|
31
|
+
# Compare two palettes
|
|
32
|
+
/color-palette compare --a "#1a1a2e,#16213e,#0f3460" --b "#264653,#2a9d8f,#e9c46a"
|
|
33
|
+
|
|
34
|
+
# Export palette to CSS/Tailwind/design tokens
|
|
35
|
+
/color-palette export --palette "#264653,#2a9d8f,#e9c46a,#f4a261,#e76f51" --format tailwind
|
|
36
|
+
|
|
37
|
+
# Extract palette from an image
|
|
38
|
+
/color-palette from-image path/to/image.png
|
|
39
|
+
|
|
40
|
+
# Get suggestions for a project type
|
|
41
|
+
/color-palette suggest --industry healthcare --style modern --accessibility AA
|
|
42
|
+
|
|
43
|
+
# Check accessibility of a palette
|
|
44
|
+
/color-accessibility --palette "#1a1a2e,#e94560" --standard AA
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Color Theory
|
|
48
|
+
|
|
49
|
+
The addon supports these harmony models:
|
|
50
|
+
|
|
51
|
+
| Model | Description |
|
|
52
|
+
|-------|-------------|
|
|
53
|
+
| Complementary | Two colors opposite on the wheel |
|
|
54
|
+
| Analogous | Three adjacent colors on the wheel |
|
|
55
|
+
| Triadic | Three colors equally spaced (120 degrees apart) |
|
|
56
|
+
| Split-complementary | Base + two colors adjacent to its complement |
|
|
57
|
+
| Tetradic | Four colors forming a rectangle on the wheel |
|
|
58
|
+
| Monochromatic | Variations of a single hue (lightness/saturation shifts) |
|
|
59
|
+
|
|
60
|
+
## Export Formats
|
|
61
|
+
|
|
62
|
+
- **HEX** — Standard hex codes (`#264653`)
|
|
63
|
+
- **RGB** — RGB values (`rgb(38, 70, 83)`)
|
|
64
|
+
- **HSL** — HSL values (`hsl(195, 37%, 24%)`)
|
|
65
|
+
- **CSS Custom Properties** — `--color-primary: #264653;`
|
|
66
|
+
- **Tailwind Config** — `colors: { primary: '#264653' }`
|
|
67
|
+
- **Design Tokens** — JSON design token format
|
|
68
|
+
|
|
69
|
+
## Accessibility
|
|
70
|
+
|
|
71
|
+
Contrast ratios are calculated per WCAG 2.1:
|
|
72
|
+
- **AA Normal Text**: minimum 4.5:1
|
|
73
|
+
- **AA Large Text**: minimum 3:1
|
|
74
|
+
- **AAA Normal Text**: minimum 7:1
|
|
75
|
+
- **AAA Large Text**: minimum 4.5:1
|
|
76
|
+
|
|
77
|
+
The addon generates a full contrast matrix showing all foreground/background combinations with pass/fail indicators.
|
|
78
|
+
|
|
79
|
+
## Standalone
|
|
80
|
+
|
|
81
|
+
This addon works independently of any framework. It does not require SDLC, marketing, or any other framework to be installed.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "color-palette",
|
|
3
|
+
"type": "addon",
|
|
4
|
+
"name": "Color Palette",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Color palette selection and review tooling with color theory fundamentals, current trend research, and accessibility analysis.",
|
|
7
|
+
"core": false,
|
|
8
|
+
"autoInstall": false,
|
|
9
|
+
"author": "AIWG Contributors",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"repository": "https://github.com/jmagly/aiwg",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"color",
|
|
14
|
+
"palette",
|
|
15
|
+
"design",
|
|
16
|
+
"accessibility",
|
|
17
|
+
"color-theory",
|
|
18
|
+
"trends",
|
|
19
|
+
"wcag"
|
|
20
|
+
],
|
|
21
|
+
"entry": {
|
|
22
|
+
"rules": "rules/",
|
|
23
|
+
"skills": "skills/",
|
|
24
|
+
"templates": "templates/"
|
|
25
|
+
},
|
|
26
|
+
"skills": [
|
|
27
|
+
"color-palette",
|
|
28
|
+
"color-trends",
|
|
29
|
+
"color-accessibility"
|
|
30
|
+
],
|
|
31
|
+
"dependencies": []
|
|
32
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: color-output-format
|
|
3
|
+
name: Color Output Format
|
|
4
|
+
enforcement: MEDIUM
|
|
5
|
+
scope: color-palette
|
|
6
|
+
description: Consistent formatting for all color output across the color-palette addon.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Color Output Format
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Ensure all color output from the color-palette addon uses a consistent, readable format that works across terminals and documentation.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
### 1. Always Show Multiple Representations
|
|
18
|
+
|
|
19
|
+
When displaying a color, include at minimum:
|
|
20
|
+
- HEX code (6-digit, lowercase, with `#` prefix)
|
|
21
|
+
- Visual swatch (ANSI color block if terminal supports it, or unicode block `██████`)
|
|
22
|
+
- Human-readable name (descriptive, not generic)
|
|
23
|
+
|
|
24
|
+
**Format**:
|
|
25
|
+
```
|
|
26
|
+
#rrggbb ██████ Descriptive Name (H:xxx S:xx% L:xx%)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 2. HEX Normalization
|
|
30
|
+
|
|
31
|
+
- Always use 6-digit lowercase HEX: `#2d5a27` not `#2D5A27` or `#2d5a27ff`
|
|
32
|
+
- Expand 3-digit shorthand: `#fff` → `#ffffff`
|
|
33
|
+
- Strip alpha channel for display (note alpha separately if relevant)
|
|
34
|
+
|
|
35
|
+
### 3. Color Naming
|
|
36
|
+
|
|
37
|
+
Generate descriptive names, not generic labels:
|
|
38
|
+
- `Forest Green` not `Green`
|
|
39
|
+
- `Desert Gold` not `Yellow`
|
|
40
|
+
- `Steel Blue` not `Blue`
|
|
41
|
+
- `Burgundy Dark` not `Dark Red`
|
|
42
|
+
|
|
43
|
+
Use color name databases (X11, CSS named colors) as a starting point, then refine for specificity.
|
|
44
|
+
|
|
45
|
+
### 4. Palette Display Order
|
|
46
|
+
|
|
47
|
+
When displaying a palette:
|
|
48
|
+
1. Order by intended role (primary → secondary → accent → neutral) if roles are known
|
|
49
|
+
2. Otherwise order by hue (0-360 degrees)
|
|
50
|
+
3. Within same hue, order dark to light
|
|
51
|
+
|
|
52
|
+
### 5. Contrast Ratio Format
|
|
53
|
+
|
|
54
|
+
Always display contrast ratios as `X.X:1` with one decimal place:
|
|
55
|
+
- `4.5:1` not `4.51:1` or `4.5`
|
|
56
|
+
- Include pass/fail indicator: `4.5:1 PASS` or `2.3:1 FAIL`
|
|
57
|
+
|
|
58
|
+
### 6. Accessibility Indicators
|
|
59
|
+
|
|
60
|
+
Use clear indicators for compliance:
|
|
61
|
+
- `PASS` — meets the specified standard
|
|
62
|
+
- `FAIL` — does not meet the specified standard
|
|
63
|
+
- Specify which standard: `AA`, `AAA`, `AA Large Text`
|
|
64
|
+
|
|
65
|
+
### 7. No Color-Only Communication
|
|
66
|
+
|
|
67
|
+
Never convey meaning through color alone in output. Always pair color swatches with:
|
|
68
|
+
- Text labels
|
|
69
|
+
- HEX codes
|
|
70
|
+
- Pass/fail text indicators
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: color-accessibility
|
|
3
|
+
description: WCAG accessibility analysis for color palettes including contrast ratios, compliance checking, and remediation suggestions. Use when user needs to verify colors meet accessibility standards.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Color Accessibility Skill
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Analyze color palettes for WCAG 2.1 accessibility compliance. Calculate contrast ratios for all color pairs, identify failing combinations, and suggest fixes to meet AA or AAA standards.
|
|
12
|
+
|
|
13
|
+
## When This Skill Applies
|
|
14
|
+
|
|
15
|
+
- User asks "are these colors accessible?"
|
|
16
|
+
- User wants to "check contrast ratios"
|
|
17
|
+
- User needs "WCAG compliance" for a palette
|
|
18
|
+
- User asks about "color accessibility"
|
|
19
|
+
- User wants to ensure colors work for colorblind users
|
|
20
|
+
- User mentions "AA" or "AAA" standards
|
|
21
|
+
|
|
22
|
+
## Trigger Phrases
|
|
23
|
+
|
|
24
|
+
| Natural Language | Action |
|
|
25
|
+
|------------------|--------|
|
|
26
|
+
| "Check if these colors are accessible" | Full WCAG analysis |
|
|
27
|
+
| "What's the contrast ratio?" | Calculate specific pair ratio |
|
|
28
|
+
| "Make this palette AA compliant" | Analyze + suggest fixes |
|
|
29
|
+
| "Is this readable?" | Text contrast check |
|
|
30
|
+
| "Color blind friendly?" | Color vision deficiency check |
|
|
31
|
+
| "Fix the accessibility of this palette" | Remediation suggestions |
|
|
32
|
+
|
|
33
|
+
## Parameters
|
|
34
|
+
|
|
35
|
+
- `--palette <colors>` — Comma-separated color values to analyze
|
|
36
|
+
- `--foreground <color>` — Specific foreground color (for pair check)
|
|
37
|
+
- `--background <color>` — Specific background color (for pair check)
|
|
38
|
+
- `--standard <level>` — Target standard: A, AA (default), AAA
|
|
39
|
+
- `--fix` — Include remediation suggestions for failing pairs
|
|
40
|
+
- `--matrix` — Show full contrast matrix for all pairs
|
|
41
|
+
|
|
42
|
+
## Analysis Process
|
|
43
|
+
|
|
44
|
+
### 1. Parse Colors
|
|
45
|
+
|
|
46
|
+
Accept colors in any format and normalize to HEX + RGB + HSL:
|
|
47
|
+
- HEX: `#1a1a2e`, `#fff`
|
|
48
|
+
- RGB: `rgb(26, 26, 46)`
|
|
49
|
+
- HSL: `hsl(240, 28%, 14%)`
|
|
50
|
+
- Named: `navy`, `coral`, `forestgreen`
|
|
51
|
+
|
|
52
|
+
### 2. Calculate Relative Luminance
|
|
53
|
+
|
|
54
|
+
For each color, calculate relative luminance per WCAG 2.1:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
For each channel (R, G, B):
|
|
58
|
+
sRGB = channel / 255
|
|
59
|
+
linear = sRGB <= 0.04045
|
|
60
|
+
? sRGB / 12.92
|
|
61
|
+
: ((sRGB + 0.055) / 1.055) ^ 2.4
|
|
62
|
+
|
|
63
|
+
L = 0.2126 * R_linear + 0.7152 * G_linear + 0.0722 * B_linear
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 3. Calculate Contrast Ratios
|
|
67
|
+
|
|
68
|
+
For every foreground/background pair:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
ratio = (max(L1, L2) + 0.05) / (min(L1, L2) + 0.05)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 4. Evaluate Against Standards
|
|
75
|
+
|
|
76
|
+
| Standard | Normal Text (< 18pt) | Large Text (>= 18pt or 14pt bold) | UI Components |
|
|
77
|
+
|----------|---------------------|-----------------------------------|---------------|
|
|
78
|
+
| A | No minimum | No minimum | No minimum |
|
|
79
|
+
| AA | 4.5:1 | 3:1 | 3:1 |
|
|
80
|
+
| AAA | 7:1 | 4.5:1 | 4.5:1 |
|
|
81
|
+
|
|
82
|
+
### 5. Generate Contrast Matrix
|
|
83
|
+
|
|
84
|
+
For N colors, generate an N x N matrix:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Contrast Matrix (AA Standard)
|
|
88
|
+
|
|
89
|
+
#1a1a2e #16213e #0f3460 #e94560 #ffffff
|
|
90
|
+
#1a1a2e — 1.2:1 1.8:1 5.4:1 14.2:1
|
|
91
|
+
FAIL FAIL PASS PASS
|
|
92
|
+
#16213e 1.2:1 — 1.5:1 4.5:1 11.8:1
|
|
93
|
+
FAIL FAIL PASS PASS
|
|
94
|
+
#0f3460 1.8:1 1.5:1 — 3.0:1 7.9:1
|
|
95
|
+
FAIL FAIL FAIL PASS
|
|
96
|
+
#e94560 5.4:1 4.5:1 3.0:1 — 2.6:1
|
|
97
|
+
PASS PASS FAIL FAIL
|
|
98
|
+
#ffffff 14.2:1 11.8:1 7.9:1 2.6:1 —
|
|
99
|
+
PASS PASS PASS FAIL
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 6. Color Vision Deficiency Check
|
|
103
|
+
|
|
104
|
+
Simulate how the palette appears under common color vision deficiencies:
|
|
105
|
+
|
|
106
|
+
| Type | Prevalence | Affected Colors |
|
|
107
|
+
|------|-----------|----------------|
|
|
108
|
+
| Protanopia (no red) | ~1% males | Red-green confusion |
|
|
109
|
+
| Deuteranopia (no green) | ~1% males | Red-green confusion |
|
|
110
|
+
| Tritanopia (no blue) | ~0.003% | Blue-yellow confusion |
|
|
111
|
+
| Achromatopsia (no color) | ~0.003% | All hues lost |
|
|
112
|
+
|
|
113
|
+
Check that colors remain distinguishable under each simulation. Flag pairs that become indistinguishable.
|
|
114
|
+
|
|
115
|
+
### 7. Remediation Suggestions
|
|
116
|
+
|
|
117
|
+
When `--fix` is specified, for each failing pair suggest adjustments:
|
|
118
|
+
|
|
119
|
+
- Darken the darker color or lighten the lighter color
|
|
120
|
+
- Adjust saturation to increase perceived contrast
|
|
121
|
+
- Suggest the minimum lightness shift needed to pass
|
|
122
|
+
- Provide the adjusted color value
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Failing pair: #0f3460 on #e94560 (3.0:1, needs 4.5:1)
|
|
126
|
+
|
|
127
|
+
Suggestions:
|
|
128
|
+
Option A: Darken background → #0a2340 (ratio: 4.6:1) PASS
|
|
129
|
+
Option B: Lighten foreground → #ff6b7f (ratio: 4.5:1) PASS
|
|
130
|
+
Option C: Use white text instead → #ffffff on #e94560 (2.6:1) FAIL
|
|
131
|
+
Use white on darkened → #ffffff on #c93050 (4.8:1) PASS
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Output Format
|
|
135
|
+
|
|
136
|
+
### Summary View (default)
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
Accessibility Report — AA Standard
|
|
140
|
+
|
|
141
|
+
Palette: #1a1a2e, #16213e, #0f3460, #e94560, #ffffff
|
|
142
|
+
|
|
143
|
+
Overall: 6/10 pairs pass AA (60%)
|
|
144
|
+
|
|
145
|
+
PASSING (6):
|
|
146
|
+
#1a1a2e on #e94560 — 5.4:1 (AA normal text)
|
|
147
|
+
#1a1a2e on #ffffff — 14.2:1 (AAA normal + large)
|
|
148
|
+
#16213e on #e94560 — 4.5:1 (AA normal text, borderline)
|
|
149
|
+
#16213e on #ffffff — 11.8:1 (AAA normal + large)
|
|
150
|
+
#0f3460 on #ffffff — 7.9:1 (AAA normal + large)
|
|
151
|
+
#e94560 on #1a1a2e — 5.4:1 (AA normal text)
|
|
152
|
+
|
|
153
|
+
FAILING (4):
|
|
154
|
+
#1a1a2e on #16213e — 1.2:1 (needs 4.5:1)
|
|
155
|
+
#1a1a2e on #0f3460 — 1.8:1 (needs 4.5:1)
|
|
156
|
+
#16213e on #0f3460 — 1.5:1 (needs 4.5:1)
|
|
157
|
+
#e94560 on #ffffff — 2.6:1 (needs 4.5:1)
|
|
158
|
+
|
|
159
|
+
Recommendations:
|
|
160
|
+
- Avoid using dark colors on each other for text
|
|
161
|
+
- #e94560 needs a darker variant for use on white backgrounds
|
|
162
|
+
- Consider adding a dark text color (#1a1a2e) for light backgrounds
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Pair Check View
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
Contrast Check
|
|
169
|
+
|
|
170
|
+
Foreground: #e94560 (Coral Red)
|
|
171
|
+
Background: #1a1a2e (Dark Navy)
|
|
172
|
+
|
|
173
|
+
Contrast Ratio: 5.4:1
|
|
174
|
+
|
|
175
|
+
AA Normal Text (4.5:1): PASS
|
|
176
|
+
AA Large Text (3.0:1): PASS
|
|
177
|
+
AAA Normal Text (7.0:1): FAIL (need 7.0:1)
|
|
178
|
+
AAA Large Text (4.5:1): PASS
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Best Practices
|
|
182
|
+
|
|
183
|
+
1. **Test text on backgrounds, not just swatches** — A palette can look cohesive but fail for readability
|
|
184
|
+
2. **Check both directions** — Light text on dark AND dark text on light
|
|
185
|
+
3. **Include white and near-black** — Most palettes need a light and dark neutral for text
|
|
186
|
+
4. **Don't rely on color alone** — Use icons, patterns, or labels alongside color for meaning
|
|
187
|
+
5. **Test at actual sizes** — Large text thresholds are different from normal text
|
|
188
|
+
6. **Consider dark mode** — Recalculate for dark mode backgrounds
|