color-contrast-architect

Audits design token foreground/background pairs against WCAG 2.2 contrast thresholds across themes.

6|Updated Jul 10, 2026
One-click install
npx skills add https://github.com/Mozurok/fhorja.dev --skill color-contrast-architect-mozurok
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: color-contrast-architect
Source: https://github.com/Mozurok/fhorja.dev/tree/main/.claude/skills/color-contrast-architect
Command: npx skills add https://github.com/Mozurok/fhorja.dev --skill color-contrast-architect-mozurok

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Design systems often lock color tokens that pass a casual eyeball check but fail WCAG contrast requirements when applied to real text, UI components, or focus indicators, forcing expensive multi-component rewrites late in the project. This Skill catches those failures before tokens lock by auditing every documented foreground/background pair. ## Core Features & Use Cases - Pairwise contrast matrix: Computes WCAG 2.2 contrast ratios for every documented foreground/background token pair across light and dark themes, writing one row per pair to CONTRAST_AUDIT.md with no silent omissions. - Context-aware thresholds: Scores each pair against the correct threshold for its design context (normal text, large text, UI components, focus indicators, graphical objects), applying the strictest threshold for multi-context pairs. - Token-level remediation: For every failing pair, proposes a concrete fix such as a hex value adjustment, a context reclassification, or a documented deferral, and stages PROPOSED blocks for DECISIONS.md and IMPLEMENTATION_PLAN.md. - Use Case: Before locking a new design system's color palette, run this audit to verify that the proposed primary text color on the surface background meets 4.5:1 for body text in both light and dark themes, and receive exact token deltas for any pair that fails. ## Quick Start Audit all color token pairs in my design system's foundations/color.md against WCAG 2.2 AA for both light and dark themes and write the contrast matrix to the task folder.

Frequently Asked Questions about color-contrast-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check WCAG contrast ratios for design system color tokens?▼

Run a pairwise audit that resolves each token to its sRGB hex value, computes the relative luminance ratio, and compares it against WCAG 2.2 thresholds per context. This Skill writes every pair as a row in a CONTRAST_AUDIT.md matrix with PASS-AAA, PASS-AA, FAIL-AA, or UNRESOLVED verdicts.

What contrast ratio does WCAG 2.2 require for text and UI components?▼

WCAG 2.2 requires 4.5:1 for normal text at AA (7:1 for AAA), 3:1 for large text at AA (4.5:1 for AAA), and 3:1 for UI components, graphical objects, and focus indicators. Focus indicators must meet 3:1 against each adjacent color.

Does the audit support both light and dark themes?▼

Yes, the audit resolves token values per theme and produces matrix rows for every theme in the input list. Light-and-dark projects get both themes represented for each documented pair.

What happens when a color pair fails the contrast check?▼

Each failing pair receives a concrete remediation: a token value adjustment with the resulting ratio, a context reclassification if the pair only serves large text, or a documented deferral. The audit never emits a bare fix-it instruction.

When should I not run a full contrast audit?▼

Skip it for a single pair, which belongs inline in a component spec, when the design system has no theme variants, or when no accessibility target is locked yet. After remediation is agreed, hand off to implementation rather than re-auditing.