Download the PHP package theunwindfront/tailwindcss-contrast-checker without Composer
On this page you can find all versions of the php package theunwindfront/tailwindcss-contrast-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download theunwindfront/tailwindcss-contrast-checker
More information about theunwindfront/tailwindcss-contrast-checker
Files in theunwindfront/tailwindcss-contrast-checker
Package tailwindcss-contrast-checker
Short Description A build-time CLI tool to catch accessibility (a11y) violations by checking Tailwind CSS text and background color combinations for WCAG contrast ratios.
License MIT
Informations about the package tailwindcss-contrast-checker
@theunwindfront/tailwindcss-contrast-checker
A fast, lightweight CLI tool that scans your codebase for accessibility (a11y) violations by checking Tailwind CSS text and background color combinations against WCAG 2.1 contrast standards.
The Problem
Accessibility (a11y) is often treated as an afterthought in rapid UI development. Developers frequently combine text and background utility classes (like bg-gray-300 text-white) that fail WCAG contrast ratios, making the application illegible for visually impaired users. Catching these issues manually or relying on browser extensions is slow and error-prone.
The Solution
This CLI tool scans your HTML, Vue, React, Svelte, or Blade templates, extracts the Tailwind utility classes, and mathematically calculates the relative luminance of overlapping background and text color pairs. It warns you in the terminal before you ship to production.
Installation
Install the package via Composer (for Laravel integration) and NPM:
Usage Guide
You can run the checker manually or add it to your CI/CD pipeline or build scripts.
Adding to package.json
Features
- 🚀 Framework Agnostic: Scans HTML, JS, JSX, TS, TSX, Vue, Svelte, and Blade files.
- 🎨 Smart Defaults: Supports standard Tailwind CSS v3 and v4 default colors.
- 📐 Arbitrary Values: Supports arbitrary hex color values (e.g.,
bg-[#ff0000]). - ⚡ High Performance: Powered by
fast-globfor rapid codebase scanning.
👥 Credits
- Sagar Pansuriya - Lead Creator & Developer
🤝 Support
For questions or issues, contact [email protected]
📄 License
The MIT License (MIT). Please see License File for more information.