Contrast Checker
Check color contrast ratios per WCAG 2.1 guidelines. Test foreground and background color combinations for AA and AAA compliance.
Contrast Checker
Contrast Checker evaluates color combinations against WCAG 2.1 guidelines. All calculations are performed locally in your browser.
How to Check Color Contrast
- Select or enter a foreground (text) color using the first color picker.
- Select or enter a background color using the second color picker.
- View the contrast ratio and WCAG compliance status for AA and AAA levels.
Frequently Asked Questions
Questions about contrast checking? We have answers.
What is WCAG contrast ratio?
The WCAG contrast ratio measures the difference in luminance between two colors. It ranges from 1:1 (same color) to 21:1 (black on white).
What are AA and AAA requirements?
AA requires 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 for normal text and 4.5:1 for large text.
Is this tool free and private?
Yes, absolutely. All calculations happen instantly in your browser. No data is sent to any server.
Automated E2E Test Suite Logs
Our build systems validate edge-case processing under extreme conditions before each deployment.
Tool Changelog & Updates
- Feature: Color suggestion engine — when contrast fails AA or AAA, the tool automatically finds the closest accessible color by adjusting lightness, with a one-click apply button.
- Feature: Multi-format color display — HEX, RGB, HSL, and CMYK representations with toggle buttons for quick switching.
- UX: Interactive contrast scale with AA/AAA threshold markers and real-time cursor.
- Fix: Fixed dark theme contrast preview visibility — replaced static white backgrounds with theme-aware CSS variables.
- Feature: Color suggestion engine — when contrast fails AA or AAA, the tool automatically finds the closest accessible color by adjusting lightness, with a one-click apply button.
- Feature: Multi-format color display — each color now shows HEX, RGB, HSL, and CMYK representations with toggle buttons for quick switching.
- UX: Interactive contrast scale — a visualized gradient bar from 1:1 to 21:1 with AA/AAA threshold markers and a real-time cursor showing current ratio position.
- UX: Multiple color format input — the hex input now accepts HEX, rgb(), and hsl() formats and converts them automatically.
- Fix: Fixed dark theme contrast preview visibility — replaced static white backgrounds with theme-aware CSS variables for clear readability in both light and dark modes.
- Fix: Removed external color library dependency — all color conversion and contrast calculations now use pure JavaScript implementations for reliable server-side rendering.
- Feature: Added comprehensive Vitest test suite covering Tool rendering, worker operations, and shared operation logic — all 871 image tests passing.
- Fix: Fixed OffscreenCanvas mock patterns in tests for proper constructor instantiation.
- Feature: Initial release with WCAG 2.1 contrast ratio calculation and AA/AAA compliance checking — 100% client-side.
- UX: Dual color pickers with hex input fields and live contrast preview with sample text.
- UX: Real-time AA/AAA pass/fail indicators for normal text, large text, and UI components.
- Security: All contrast calculations performed locally — zero data sent to any server.