Check a colour pair against WCAG
check_contrastCheck WCAG 2.2 contrast ratio and pass/fail verdict for any color pair, using hex values or Sekura tokens. Resolves tokens for the selected theme, including translucent values.
Instructions
WCAG 2.2 contrast ratio and pass/fail verdict for a foreground/background pair. Accepts hex values or Sekura token names — passing tokens resolves them for the chosen theme, including compositing translucent values over the page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| use | No | What the pair is for. Drives the threshold: 4.5:1 body, 3:1 large text and UI components. | |
| theme | No | Theme to resolve token names in (default light). | |
| background | Yes | Hex value, or a token name. | |
| foreground | Yes | Hex value, or a token name like "color-text-primary". |