check_color_contrast
Check foreground/background color contrast against WCAG thresholds, with optional brand-aligned replacement suggestions from a live URL or provided palette.
Instructions
Check a foreground/background color pair against WCAG contrast thresholds. When it fails, suggests BRAND-aligned replacements — extracts the actual brand palette from a live URL using our scanner (CSS vars + most-used colors), or use a provided brandColors array. No url and no brandColors = ratio + pass/fail only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Live URL to extract brand palette from (uses our scanner — CSS vars + dominant colors). | |
| isBold | No | Whether text is bold (default false) | |
| fontSize | No | Font size in px (default 16) | |
| background | Yes | Background color (hex or rgb) | |
| foreground | Yes | Foreground color (hex or rgb) | |
| brandColors | No | Pre-supplied brand palette. Skips URL extraction if provided. |