Skip to content
Development
Command

/check-contrast

Check color contrast ratios against WCAG accessibility requirements.

From plugin
rohitg00-claude-code-toolkit
2.5k199 skills138 agents199 commands
Install
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/check-contrast

Context preview

What this command does when you run it.

Check color contrast ratios against WCAG accessibility requirements.

Command definition

check-contrast.md

/check-contrast - Check Color Contrast

Check color contrast ratios against WCAG accessibility requirements.

Steps

1. Scan CSS, SCSS, and styled-components for all text color and background color pairs 2. Resolve CSS custom properties and theme variables to actual color values 3. Calculate the luminance contrast ratio for each foreground/background pair 4. Check against WCAG 2.1 requirements: 4.5:1 for normal text, 3:1 for large text (18px+ or 14px+ bold) 5. Check non-text contrast for UI components and graphical objects: 3:1 ratio 6. Identify text on images or gradients that may have insufficient contrast 7. Check focus indicator contrast against adjacent colors 8. Verify contrast in both light and dark themes if the app supports them 9. Flag transparent or semi-transparent colors that reduce effective contrast 10. Generate a report: element, foreground color, background color, ratio, pass/fail 11. Show the total pass/fail count and compliance percentage 12. Highlight the worst offenders that need immediate attention

Rules

  • Test both light and dark mode color schemes
  • Account for opacity when calculating effective contrast
  • Large text threshold: 18px regular or 14px bold
  • Do not flag disabled elements as they are exempt from contrast requirements
  • Check placeholder text contrast (should meet 4.5:1 even though many sites skip this)
  • Consider adjacent color contrast for interactive component boundaries
  • Report all unique color pairs, not every instance
Read more
Ships withrohitg00-claude-code-toolkit

The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.

Get the whole plugin