Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Check color contrast ratios for WCAG accessibility compliance. Use when: auditing UI components for accessibility, validating color schemes meet AA/AAA standards, fixing low-contrast text in designs.
.claude/skills/terminalskills-contrast-check/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-12 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 23% | 0% |
| case-20 | ✗→✓ | ▲ Improved | -40% | 0% |
| case-07 | ✓→✗ | ▼ Worse | -45% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 41% | 0% |
Check color pairs against WCAG 2.1 contrast requirements. Pass in hex colors and get contrast ratios with AA/AAA pass/fail results for both normal and large text.
WCAG thresholds:
Run the script with two or more hex colors (with or without # prefix):
bashbash <skill-path>/scripts/contrast-check.sh <color1> <color2> [color3] [color4] ...
The script outputs JSON with contrast ratios and pass/fail results:
json{ "pairs": [ { "foreground": "#1a1a2e", "background": "#ffffff", "ratio": 16.57, "aa": { "normal": true, "large": true }, "aaa": { "normal": true, "large": true } } ], "summary": { "totalPairs": 2, "passAA": 1, "passAAA": 1, "failAA": 1 } }
After checking, present a table to the user:
Contrast Check Results:
#1a1a2e on #ffffff — 16.57:1 — AA: Pass — AAA: Pass
#e94560 on #ffffff — 3.94:1 — AA: Fail (normal) / Pass (large) — AAA: Fail
Summary: 1/2 pairs pass AA for normal text, 1/2 pass AAA.Flag any failing pairs and suggest fixes (darken/lighten the color to reach the threshold).
bashbash <skill-path>/scripts/contrast-check.sh "#1a1a2e" "#ffffff"
Output:
json{ "pairs": [ { "foreground": "#1a1a2e", "background": "#ffffff", "ratio": 16.57, "aa": { "normal": true, "large": true }, "aaa": { "normal": true, "large": true } } ], "summary": { "totalPairs": 1, "passAA": 1, "passAAA": 1, "failAA": 0 } }
bashbash <skill-path>/scripts/contrast-check.sh "#1a1a2e" "#e94560" "#ffffff" "#3d83f7" "#bdbdbd"
The script checks all foreground/background combinations and reports which pairs fail AA or AAA. For example, #e94560 on #ffffff yields a ratio of 3.94:1 which fails AA for normal text but passes for large text.
#).image-analysis skill to extract colors from a design first, then pipe the hex values into this skill to audit accessibility.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-09 | fail→fail | 10,594 | 9,928 | -6% | 1 | 1 | 0% | 2,412 | 1,689 | -30% | 0 | 0 | — |
case-01 | fail→fail | 21,147 | 7,720 | -63% | 1 | 1 | 0% | 4,865 | 1,203 | -75% | 0 | 0 | — |
case-02 | fail→fail | 20,025 | 22,265 | +11% | 1 | 1 | 0% | 4,778 | 5,276 | +10% | 0 | 0 | — |
case-03 | pass→pass | 11,460 | 10,422 | -9% | 1 | 1 | 0% | 2,072 | 2,918 | +41% | 0 | 0 | — |
case-04 | pass→pass | 9,732 | 7,795 | -20% | 1 | 1 | 0% | 2,033 | 2,391 | +18% | 0 | 0 | — |
case-05 | pass→pass | 9,638 | 5,963 | -38% | 1 | 1 | 0% | 1,790 | 2,006 | +12% | 0 | 0 | — |
case-06 | pass→pass | 11,629 | 23,171 | +99% | 1 | 1 | 0% | 2,564 | 4,467 | +74% | 0 | 0 | — |
case-07 | pass→fail | 9,749 | 5,996 | -38% | 1 | 1 | 0% | 2,150 | 1,188 | -45% | 0 | 0 | — |
case-08 | fail→fail | 13,542 | 5,812 | -57% | 1 | 1 | 0% | 3,164 | 1,151 | -64% | 0 | 0 | — |
case-10 | pass→pass | 7,060 | 11,635 | +65% | 1 | 1 | 0% | 1,235 | 2,516 | +104% | 0 | 0 | — |
case-11 | pass→pass | 4,754 | 9,356 | +97% | 1 | 1 | 0% | 824 | 2,039 | +147% | 0 | 0 | — |
case-12 | fail→pass | 8,119 | 2,297 | -72% | 1 | 1 | 0% | 1,451 | 1,185 | -18% | 0 | 0 | — |
case-13 | fail→fail | 13,641 | 7,636 | -44% | 1 | 1 | 0% | 2,216 | 2,339 | +6% | 0 | 0 | — |
case-14 | pass→pass | 8,374 | 10,664 | +27% | 1 | 1 | 0% | 1,560 | 2,146 | +38% | 0 | 0 | — |
case-15 | fail→pass | 7,237 | 3,377 | -53% | 1 | 1 | 0% | 1,250 | 1,533 | +23% | 0 | 0 | — |
case-16 | pass→pass | 6,692 | 4,386 | -34% | 1 | 1 | 0% | 1,310 | 1,723 | +32% | 0 | 0 | — |
case-17 | pass→pass | 7,214 | 7,080 | -2% | 1 | 1 | 0% | 1,434 | 2,252 | +57% | 0 | 0 | — |
case-18 | pass→pass | 7,599 | 3,904 | -49% | 1 | 1 | 0% | 985 | 1,587 | +61% | 0 | 0 | — |
case-19 | pass→pass | 7,801 | 7,824 | +0% | 1 | 1 | 0% | 1,321 | 2,289 | +73% | 0 | 0 | — |
case-20 | fail→pass | 12,314 | 3,721 | -70% | 1 | 1 | 0% | 2,195 | 1,318 | -40% | 0 | 0 | — |
case-21 | pass→pass | 15,081 | 4,404 | -71% | 1 | 1 | 0% | 2,605 | 1,654 | -37% | 0 | 0 | — |
case-22 | fail→fail | 12,860 | 5,017 | -61% | 1 | 1 | 0% | 2,913 | 1,105 | -62% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +9 percentage points is the difference between those two pass rates over the 17 comparable cases. 4 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.