Audit a Tailwind config for color contrast in dark mode and flag every text-on-background pair below WCAG AA thresholds.
Scans a Tailwind project for text-on-background class pairs used in dark mode (dark:text-* dark:bg-*) and computes WCAG AA contrast for each pair. Flags every pair below 4.5:1 (regular text) or 3.0:1 (large text).
repo_dir: project root.tailwind_config: path to tailwind.config.{js,ts}.glob: source glob (default src/**/*.{jsx,tsx,html}).node -e "console.log(JSON.stringify(require('tailwindcss/resolveConfig')(require('<tailwind_config>'))))" to get the resolved color palette.glob and find className strings. Extract tokens prefixed dark:, including dark:text-*, dark:bg-*, dark:border-*.dark:bg-slate-900 -> #0f172a).(L1 + 0.05) / (L2 + 0.05) with L1 the lighter.pass-AAA >= 7.0; pass-AA >= 4.5; pass-AA-large >= 3.0; fail below.dark:text-slate-400 to dark:text-slate-200).dark-contrast-report.md with a summary header (totals per tier), a "Failures" table (file:line, fg, bg, ratio, suggested fix), and a "Borderline" section for pairs barely passing AA.
Plug a sample of failing pairs into an external tool (https://webaim.org/resources/contrastchecker/) and confirm the computed ratio matches within 0.05. After applying a suggested replacement, re-run the audit and confirm the pair moves from fail to pass-AA. If the resolved palette has overrides via extend.colors, validate by spot-checking three custom token resolutions.
style={{ color: '#fff' }}): the audit covers Tailwind tokens only; surface a note for files using inline styles heavily.group-hover:dark:text-*: include them with the parent's variant noted in the report.darkMode: 'class' vs 'media': works for both; pair detection is independent of toggle strategy.Other publishers' experience with this skill. Self-rating is blocked.
Sign in and publish to the registry to leave a rating.
No ratings yet. Be the first.
Same domains or capabilities as amitte/dark-mode-contrast-checker.
Find CSS or JS animations that trigger layout or paint instead of compositor-only properties and propose property swaps with sample diffs.
Read a Lighthouse or CrUX report and narrate LCP, CLS, and INP scores into a prioritized fix plan with concrete code suggestions.
Tighten a Content-Security-Policy by stripping wildcards and verifying the result against actual page resource loads observed in browser logs.
Identify unused CSS classes via PurgeCSS and propose a configuration that's safe in the presence of dynamically constructed class names.
Walk a React component tree and identify subtrees not covered by an Error Boundary, suggesting placement points for new boundaries.
Extract design tokens (colors, spacing, typography) from a Figma JSON export and emit them as CSS custom properties grouped by category.