
Wcag color contrast
Checks color pairs and design tokens against WCAG contrast ratios for text and UI
Wcag color contrast is an open-source agent skill for design and media. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 18
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Wcag color contrast
This skill gives the agent the WCAG 2.2 color-contrast rules for text, large text and non-text UI elements at AA and AAA levels, along with the luminance-based ratio formula. It covers the thresholds an agent should apply when a user asks whether a few hex values pass, why some text is hard to read, or how a palette or component should be reviewed.
Beyond the rules, the skill lists common failure patterns such as light gray text, placeholder text, brand-colored buttons and focus rings, each paired with a fix. It also flags anti-patterns like relying on opacity or checking only design tokens without checking rendered output or dark mode.
For bulk work it includes a Node.js example that uses the polished library's getContrast function to test pairs of design tokens and exit with an error on violations, intended for CI. It also points to tools such as WebAIM's checker and axe-core and to related skills for keyboard focus and accessibility gates.
When your agent uses it
Use for any question about color contrast or whether colors pass WCAG, including quick checks of a few hex values and hard-to-read text: WCAG 2.2 text, large-text and non-text contrast ratios (4.5:1, 3:1) at AA and AAA, the measurement formula, palette and component reviews, and bulk checks over CSS and design tokens.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (10 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the qa-accessibility plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add testland/qa
/plugin install qa-accessibility@testland-qaOr copy only this skill to ~/.claude/skills/wcag-color-contrast:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/wcag-color-contrast &&
cp -R "$tmp/plugins/qa-accessibility/skills/wcag-color-contrast" ~/.claude/skills/wcag-color-contrast &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/wcag-color-contrast inside it instead.
Copy the skill folder to ~/.agents/skills/wcag-color-contrast to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/wcag-color-contrast &&
cp -R "$tmp/plugins/qa-accessibility/skills/wcag-color-contrast" ~/.agents/skills/wcag-color-contrast &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/wcag-color-contrast inside it instead.
Copy the skill folder to ~/.cursor/skills/wcag-color-contrast to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/wcag-color-contrast &&
cp -R "$tmp/plugins/qa-accessibility/skills/wcag-color-contrast" ~/.cursor/skills/wcag-color-contrast &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/wcag-color-contrast inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/testland/qa.git --path plugins/qa-accessibility/skills/wcag-color-contrastOr copy the folder to ~/.gemini/skills/wcag-color-contrast yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/wcag-color-contrast:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/wcag-color-contrast &&
cp -R "$tmp/plugins/qa-accessibility/skills/wcag-color-contrast" ~/.copilot/skills/wcag-color-contrast &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/wcag-color-contrast inside it instead.
Get the folder:
git clone --depth 1 https://github.com/testland/qa.gitThen copy qa/plugins/qa-accessibility/skills/wcag-color-contrast into your agent's skills folder as wcag-color-contrast. Agents that support SKILL.md read one folder per skill.
What it does
- Text contrast thresholds
- Covers the 4.5:1 and 3:1 minimums for normal and large text under AA, and the stricter AAA values.
- Non-text contrast rules
- Explains the 3:1 requirement for UI components, focus indicators and graphical state cues.
- Hover and focus content
- Describes the dismissable, hoverable and persistent conditions for tooltips and popovers.
- Contrast formula reference
- States the relative luminance ratio formula and lists common color pairings with their ratios.
- Design token bulk checks
- Provides a Node.js script using polished to test token pairs and fail on violations.
- Common failure fixes
- Lists frequent contrast problems in components with a suggested fix for each.
Good for
- Check whether a set of hex colors passes WCAG AA for body text
- Review a button or form component's CSS for contrast violations
- Audit design tokens for text and background pairs that fall below 4.5:1
- Set up a CI check that fails when color token pairs have low contrast
- Fix a light gray placeholder or focus ring that is hard to see
Wcag color contrast FAQ
When does Wcag color contrast trigger?
It is meant for any question about color contrast or whether colors pass WCAG, including quick hex-value checks and hard-to-read text.
Does Wcag color contrast run any scripts?
No scripts are bundled with the skill. It includes an example Node.js snippet using the polished npm package for token checks.
Which WCAG versions and levels does Wcag color contrast cover?
It covers WCAG 2.2 success criteria 1.4.3, 1.4.6, 1.4.11 and 1.4.13 at AA and AAA levels.
Which tools does Wcag color contrast recommend for measuring contrast?
It mentions the WebAIM Contrast Checker, Chrome DevTools, Figma plugins such as Stark and Able, the polished getContrast function, and axe-core.
How do I install Wcag color contrast in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/wcag-color-contrast to use it in all your projects, or to .claude/skills/wcag-color-contrast in one project. Or install the qa-accessibility plugin, which includes it: /plugin marketplace add testland/qa, then /plugin install qa-accessibility@testland-qa.
Does Wcag color contrast run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Wcag color contrast?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Wcag color contrast?
The closest alternatives to Wcag color contrast are Color theory, Design system, Design review, App UI design and Figma a11y review.
Where this comes from
- Description: from the skill's own SKILL.md.
More from testland/qa

Builds a CI ratchet that fails PRs only on new accessibility violations
- Open source
- 18 GitHub stars
- Developer tools

Guides an agent through W3C ARIA Authoring Practices patterns for custom widgets
- Open source
- 18 GitHub stars
- Developer tools

Adds automated axe-core accessibility scans to Playwright, Cypress and CI pipelines
- Open source
- 18 GitHub stars
- Developer tools

Builds manual screen-reader test scripts and signed sign-off reports for a feature
- Open source
- 18 GitHub stars
- Developer tools

Aggregates multi-page accessibility scans into a WCAG 2.2 conformance report
- Open source
- 18 GitHub stars
- Documentation review

Checks and tests keyboard operability, focus order and focus visibility against WCAG 2.2
- Open source
- 18 GitHub stars
- Developer tools







