Check Color Contrast Tool
check_color_contrast_toolVerify foreground and background color contrast meets WCAG 2.1 AA or AAA standards using any CSS color format.
Instructions
Checks color contrast ratios between foreground and background colors for WCAG 2.1 accessibility compliance
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | WCAG conformance level to check against (default: AA) | |
| fontSize | No | Font size category: normal (<18pt or <14pt bold) or large (≥18pt or ≥14pt bold) | |
| backgroundColor | Yes | Background color in any CSS format (hex, rgb, rgba, named colors) | |
| foregroundColor | Yes | Foreground color (text color) in any CSS format (hex, rgb, rgba, named colors) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | Yes | WCAG level checked (AA or AAA) | |
| passes | Yes | Whether the contrast ratio meets the specified WCAG level | |
| fontSize | Yes | Font size category (normal or large) | |
| contrastRatio | Yes | Calculated contrast ratio between foreground and background | |
| minimumRequired | Yes | Minimum contrast ratio required for the specified level and font size | |
| recommendations | No | Optional recommendations for improvement | |
| wcagRequirements | Yes | Complete WCAG contrast requirements for all levels |