Color Contrast Checker
Foreground Color
Background Color
Aa
Sample Text
Smaller text preview
Contrast Ratio
Normal Text
Large Text (18pt+)
AA (4.5:1): Minimum contrast for normal text. AAA (7:1): Enhanced contrast. Large text has lower requirements.
What This Tool Does
Color Contrast Checker is built for deterministic developer and agent workflows.
Check WCAG 2.1 contrast ratios for foreground/background colors with AA and AAA pass/fail feedback for normal and large text.
Use How to Use for execution steps and FAQ for constraints, policies, and edge cases.
Last updated:
This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.
Agent Invocation
Best Path For Builders
Dedicated API endpoint
Deterministic outputs, machine-safe contracts, and production-ready examples.
Dedicated API
https://aidevhub.io/api/color-contrast-checker/ OpenAPI: https://aidevhub.io/api/openapi.yaml
Unified Runtime API
https://aidevhub.io/api/tools/run/?toolId=color-contrast-checker&a=...
GET and POST are supported at /api/tools/run/ with identical validation and limits.
Limit: req / s, input max 128 KB.
How to Use Color Contrast Checker
- 1
Enter foreground and background colors
Use the color pickers or paste color values in hex (#RRGGBB), RGB (rgb(r,g,b)), or HSL (hsl(h,s%,l%)) format. The live preview updates instantly.
- 2
Check WCAG compliance levels
Review the contrast ratio and AA/AAA badges for both normal and large text. Green checkmarks mean pass, red X means fail. Use this to validate your color scheme meets accessibility standards.
- 3
Compare text readability
See how your chosen colors look with real sample text in the preview. Adjust colors until you achieve the contrast level you need—AA (4.5:1) for legal compliance, AAA (7:1) for maximum accessibility.
- 4
Swap colors to test both directions
Use the Swap control to test if the inverse color combination (light text on dark background vs dark on light) also meets your contrast needs. Useful for multi-variant designs.
- 5
Copy ratio and integrate
Once you find compliant colors, copy the ratio to clipboard and apply the color codes in your CSS, design tool, or style guide documentation.