- Home
- Skills
- UX & UI Design
- Color Contrast Checker for WCAG AA and AAA
Works with the AI Agents you already use
Color Contrast Checker for WCAG AA and AAA
by Saizul Amin
Verify WCAG 2.2 contrast ratios for text and UI elements with automated color fix suggestions.
Free
Color Contrast Checker for WCAG AA and AAA
Example session with this skill installed
Run the Color Contrast Checker for WCAG AA and AAA skill on my project and give me a prioritised list of what to fix, with exact changes.
- Read your context and instructions
- Compiled the color contrast checker
Here is what the Color Contrast Checker for WCAG AA and AAA skill produced.
Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.
Output
FAIL #777 on #fff = 4.47:1 (normal text, AA needs 4.5:1)
AA normal no | AA large yes | AAA normal no | AAA large no | UI/graphics 3:1 yes
suggestion: foreground #747474 on #fff reaches 4.5:1
or keep the foreground and use background #050505
1 pair(s), 1 failing
What you do next
- Fix the highest-severity items first.
- Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
- Keep the skill installed and re-run it whenever the project changes.
Connects securely to your tools. The creator never sees your data.
About this skill
Manual accessibility checks are slow and prone to rounding errors. This skill provides a precise Python-based contrast engine to verify WCAG 2.2 compliance for text, UI components, and design tokens without leaving your terminal.
What it does
- Precision calculation computes exact ratios for hex, RGB, HSL, and named colors without rounding up.
- Transparency compositing automatically handles
rgba()andhsla()foregrounds against solid backgrounds. - CSS token resolution reads
:rootvariables and CSS custom properties to check theme files. - Contextual thresholds applies different targets for large text, normal text, and non-text UI elements like focus rings.
- Automated fix suggestions generates the nearest passing color value by adjusting lightness while preserving hue and saturation.
How it works
- Input collection identifies pairs from manual input, a list in a text file, or by scanning a CSS stylesheet.
- Execution runs the script with flags for target levels like
--largefor headers,--uifor icons, or--level AAA. - Validation checks the results against WCAG 1.4.3, 1.4.6, or 1.4.11 criteria.
- Fixing selects the suggested foreground or background overrides provided in the output table.
Frameworks & tools
This tool uses a standalone Python 3.8+ script with no external dependencies. It parses standard CSS, Tailwind themes, and design tokens in JSON or text formats.
Why this beats prompting it yourself
LLMs frequently hallucinate contrast ratios or use imprecise rounding that fails formal audits. This skill uses a deterministic mathematical implementation of the WCAG formula, ensuring your results are legally defensible and technically accurate.
Use cases
- Audit a brand color palette for AA/AAA compliance before a design system launch.
- Verify that focus indicators and borders meet the 3:1 non-text contrast requirement.
- Scan a CSS theme file to identify failing color combinations in light and dark modes.
- Generate accessible color alternatives that stay close to the original brand intent.
Known limitations
Does not support text over gradients or background images. Complex CSS cascade and inheritance are not fully resolved; users should provide computed colors for best results.
Open source: saizul/accessibility-a11y-skills on GitHub (MIT licence, by Saizul Amin).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for UX & UI Design.
Does not support gradients or background images. Cannot resolve complex CSS inheritance; use computed colors for accurate results. WCAG 2.x only (no APCA).
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 2 days ago
- Free with an Agensi account
- Software
Python 3.8+