Check palette contrast
check_palette_contrastUse this when the user has a colour palette (2 to 12 colours) and wants to know which combinations are accessible: "check contrast of my color palette", "which of these colors can I use for text", "accessible color palette checker". Returns the full pairwise WCAG 2.x contrast matrix (ratios truncated, rounded down), which pairs pass AA/AAA for text or 3:1 for large text and UI, and a recommended text colour for each background (a palette colour that passes AA, otherwise black or white). Does not generate new colours; use generate_accessible_palette for a tonal scale and check_color_contrast for fixes to one pair.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | Optional labels in the same order as colors, e.g. ["Primary", "Accent", "Surface", "Ink"]. | |
| colors | Yes | 2 to 12 colours to test against each other, e.g. ["#1E6FD9", "#F59E0B", "#FFFFFF", "#111827"]. Hex, rgb(), hsl(), hwb(), lab(), lch(), oklab(), oklch(), color(display-p3 ...) or CSS names; translucent colours are composited over white. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| colors | Yes | ||
| matrix | Yes | ||
| request | Yes | ||
| summary | Yes | ||
| warnings | Yes | ||
| best_text | Yes | ||
| text_pairs | Yes |