/design-engine:accessible-color-and-contrastfrom design-engine
Verifies and fixes text, UI, focus, border, status, and data colors for WCAG/APCA contrast and color-vision accessibility. Use when certifying color pairs against contrast thresholds or resolving accessibility audit failures.
Ships in design-engine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com.
02-color-brand-and-visual-identity/color-system-and-palette (it already runs the contrast
gate); come here to harden, certify, and colour-blind-proof what it produced.00-cross-cutting-ops-qa-a11y/accessibility-wcag-2-2-compliance. (Contrast lives here; the
rest of WCAG lives there. They co-activate.)| Input | Supplied by | Required? | Why |
|---|---|---|---|
| Colour pairs with semantic roles | Palette or implementation | yes | Defines what must be tested |
| Text sizes, weights, states, and backgrounds | UI/design source | yes | Selects the threshold |
| Target WCAG level and supported modes | Accessibility owner | yes | Establishes acceptance |
#2563EB is.doctrine/references/wcag-2.2-criteria.md) and whether dark mode must also be certified.Design with APCA, certify with WCAG — keep the two jobs separate. Use APCA (the
perceptual algorithm; not part of any W3C standard or the current WCAG 3.0 draft) while tuning, because it tracks real legibility
across light and dark far better than the 2.x ratio, which over-passes light-on-dark and
can fail perfectly readable pairs. Then run the WCAG 2.2 ratio as the conformance gate —
it is what you legally and contractually certify against
(doctrine/references/wcag-2.2-criteria.md §Contrast method note). See references/apca-vs-wcag.md.
Apply the right threshold to each pair — these are floors, not targets. Body / small text
≥ 4.5:1; large text (≥ 24px, or ≥ 18.66px / 14pt bold) ≥ 3:1; meaningful UI components,
icons, borders that convey state, and focus rings ≥ 3:1 (WCAG 2.2 SC 1.4.3 and 1.4.11,
per doctrine/references/wcag-2.2-criteria.md). Aim past the floor (AAA is 7:1 / 4.5:1) so a
later tint tweak doesn't drop you below. Disabled controls are exempt from 1.4.3 — but exempt
is not invisible; keep them perceivable.
Measure every pair and record it — no eyeballing. Build the foreground×background matrix,
compute the ratio for each, mark PASS/FAIL against the threshold from step 2, and keep the
table as the contrast evidence (it ships with the palette). Any FAIL is rejected: retune the
ramp step (darken text, deepen the surface, raise chroma on the accent) and re-measure until
it passes. "It looks fine" is not a measurement. See examples/contrast-checked-palette.md.
Never encode meaning by hue alone — pair colour with a second cue. ~8% of men (and ~0.5%
of women) have a colour-vision deficiency, so red-vs-green status, "the blue line vs the green
line," or a red asterisk as the only signal fails them (WCAG 1.4.1 Use of Colour). Always
add a redundant non-colour cue: an icon (✓ ⚠ ✕ ℹ), a text label, a shape, a pattern/dash style,
or position. Colour becomes the accelerator, never the sole carrier. See
references/colorblind-safe-palettes.md.
Choose colour-blind-safe colours for anything that carries meaning. Status sets and data
series must stay distinguishable under deuteranopia, protanopia, and tritanopia. Separate hues
by more than hue — also by lightness and chroma — and avoid the classic traps: pure
red↔green, and teal↔grey / blue↔purple for tritanopes. Prefer a vetted safe ramp (Okabe–Ito,
IBM, Viridis for sequential) and simulate before shipping. references/colorblind-safe-palettes.md
gives ready ramps and the simulation step.
Treat dark mode as a second certification, not a freebie. Passing in light mode does not
imply passing in dark. Re-run APCA design + the WCAG gate (steps 1–3) on the dark roles
independently; accents usually need lightening and slight desaturation to hold 3:1 / 4.5:1 on
a near-dark surface. (Full dark-mode remapping lives in
02-color-brand-and-visual-identity/dark-mode-and-theming; the contrast proof lives here.)
Don't over-contrast either. #000 on #fff (≈ 21:1) vibrates and haloes — high ratio is
not the goal, legibility is. APCA flags this where the WCAG ratio cannot. Use a near-black
carrying a trace of brand hue on a slightly off-white surface; verify it still clears 4.5:1.
State the result and hand off. Output the certified pairs (with ratios), the non-colour cue paired to each meaningful colour, the colour-blind-safe status/series set, and the light + dark verdicts. Note the conformance level reached (AA / AAA per pair).
references/apca-vs-wcag.md).#000 on #fff, or chasing the highest possible ratio as if more is always better.doctrine/design-doctrine.md §2, the sourcing-authority asymmetry rule).| Output | Consumer | Evidence / acceptance |
|---|---|---|
| Contrast matrix | Designer and engineer | Pair, role, state, ratio, APCA value, and verdict |
| Colour-vision findings | Product and QA | Simulations plus redundant-cue evidence |
| Colour accessibility verdict | Release owner | PASS, CONDITIONAL, or BLOCKED by criterion |
| Condition | Decision | Wrong-choice failure |
|---|---|---|
| Normal text is below large-text threshold | Require at least 4.5:1 for AA | Body copy becomes illegible |
| Large text or non-text UI component | Require at least 3:1 where applicable | Controls or boundaries disappear |
| Status colours collide under CVD simulation | Add shape, icon, text, or pattern and adjust | Meaning is lost for colour-blind users |
| APCA and WCAG advice differ | Improve design but certify with WCAG | Draft method is misrepresented as certification |
Read and colour calculation are required. Review defaults to read-only; editing requires remediation authority. Do not claim legal compliance beyond measured evidence and scope.
Without a trusted calculator or rendered states, provide a conditional matrix and manual test plan, marking ratios unverified. Without exact colours and contexts, stop the verdict.
examples/contrast-checked-palette.md — a real, named palette with the full pair-by-pair
contrast matrix (every foreground/background ratio + PASS/FAIL), the colour-blind-safe status
set with its non-colour cues, and the dark-mode re-certification. A worked artifact, not lorem.doctrine/references/wcag-2.2-criteria.md — the contrast floors (1.4.3 / 1.4.11), the
"design with APCA, certify with WCAG" method note, and the AA-is-the-floor rule.doctrine/design-doctrine.md — Mission §0 (authored, defensible choices over convergent
defaults) and Anti-Slop Charter §2 (the sourcing-authority asymmetry rule: methods and
perceptual evidence are authority; a tool's default is not).references/apca-vs-wcag.md — when to use each, why, and the certification boundary.references/colorblind-safe-palettes.md — vetted safe ramps, the three CVD types, and the
non-colour-cue rule (WCAG 1.4.1 Use of Colour).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
wcag-contrast, color-blindness, apca, accessible-colors, a11y-audit
Other plugins' skills for the same job
npx claudepluginhub peterbamuhigire/chwezi-design-engine --plugin design-engine110 skills in this plugin
/accessibility-wcag-2-2-complianceUse when designing or auditing an interactive UI for WCAG 2.2 AA, keyboard and focus behaviour, accessible names, screen readers, target size, reflow, authentication, or reduced motion. Use inclusive-and-assistive-design for needs beyond the compliance floor./advertising-creative-art-directionUse when art-directing advertising or campaign creative - copy and image relationships, poster and cover tests, triplet or cousin campaign systems, big-idea tests across channels, a 7-point effectiveness screen, critique and ad layout specs handed back to the marketing engine. Use art-direction-routes for brand or website directions./ai-agent-uxUse when an AI agent or copilot interface needs status, plans, approvals, uncertainty, interruption, or trust controls across web or mobile. Do not use for formatting a single AI answer; route output structure and citations to ai-output-design./ai-image-generation-art-directionUse when turning an art-direction brief into generated imagery, prompts, negative constraints, reject gates, provenance notes, and post-processing instructions. Use photography-art-direction for sourced photos and visual-product-slop-audit for product-wide review./ai-output-designUse when an AI answer surface needs structure, citations, grounding, editable refinement, or a chat-versus-canvas decision. Do not use for agent autonomy, approvals, or execution status; route those interaction controls to ai-agent-ux./ai-slop-typography-auditUse when auditing an existing artefact for banned or convergent type, weak hierarchy, monotype systems, or unstated choices. Unlike visual-product-slop-audit, this inspects typography only; font selection owns the replacement design.