Token contrast auditor

From ShuaiMXu/happyhands · View interactive version

Token contrast auditor is an AI agent skill from the GitHub repository ShuaiMXu/happyhands. Compute WCAG contrast for colour pairs the token names or the source state, and report which fail.

How to use this skill

Skill file

Token Contrast Auditor

Whether a colour pair is legible is arithmetic, not taste. A team that darkens its danger colour is arguing about how it looks; the ratio against the surface it sits on is a number, and WCAG says what that number has to be.

Required evidence

Which pairs are measured

Only pairs that something states:

A pair nobody expressed is not invented. Measuring every colour against every other produces a long list of failures that describe combinations the product never renders.

Thresholds

WCAG 2.2 AA asks for 4.5:1 for normal text and 3:1 for large text and non-text contrast. A token pair does not carry the size or weight of the text it will hold, so the result reports which band a pair falls in rather than pretending to know:

Decisions

Boundary

Contrast is necessary, not sufficient. A pair that passes can still be illegible over a photograph, behind a gradient, or at a weight the ratio does not describe. Passing this audit is not an accessibility certification, and failing it is not always a defect — a disabled control is meant to recede.

Return structured evidence, findings, proposed updates and limitations. Use needs-evidence when required inputs or professional review are missing. Never invent an Experience Score or promote a project observation into a universal rule.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.