Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Color Contrast Checker for WCAG AA and AAA

    by Saizul Amin

    1

    Verify WCAG 2.2 contrast ratios for text and UI elements with automated color fix suggestions.

    Free

    Security scanned
    Color Contrast Checker for WCAG AA and AAA

    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

    1. Fix the highest-severity items first.
    2. Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
    3. 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() and hsla() foregrounds against solid backgrounds.
    • CSS token resolution reads :root variables 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

    1. Input collection identifies pairs from manual input, a list in a text file, or by scanning a CSS stylesheet.
    2. Execution runs the script with flags for target levels like --large for headers, --ui for icons, or --level AAA.
    3. Validation checks the results against WCAG 1.4.3, 1.4.6, or 1.4.11 criteria.
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Frequently Asked Questions

    This skill uses a deterministic Python engine to calculate ratios according to WCAG 2.2 formulas. Unlike standard LLM prompts which often hallucinate or round numbers incorrectly, this tool provides mathematically precise results that are legally defensible for accessibility audits.

    The skill supports Hex, RGB, HSL, and named colors. It also features transparency compositing, meaning it can accurately calculate the contrast of semi-transparent 'rgba' or 'hsla' layers against a solid background.

    Yes, it can scan entire CSS stylesheets, Tailwind theme files, and JSON design tokens. It identifies all color pairs and flags those failing to meet AA or AAA standards, saving you from manual entry.

    You will receive the standalone Python script, documentation on CLI flags, and integration guides for popular AI agents. Your purchase includes lifetime access to the current version and any future bug fixes or WCAG standard updates.

    It requires a Python 3.8+ environment and is compatible with any AI agent that supports file execution or terminal commands. It operates as a local tool, ensuring your design tokens and proprietary CSS files are processed privately without being sent to an external API.

    The tool currently requires solid background colors for calculation. It does not support complex backgrounds like gradients, textures, or images where the contrast ratio varies across the element.

    New in UX & UI Design

    Free