Accessibility

WCAG contrast ratio between two colors — the check the URL-based a11y endpoint can't do

WCAG contrast ratio between two colors — the check the URL-based a11y endpoint can't do. Give a foreground and background color (hex or rgb()); returns the exact ratio and AA/AAA pass/fail for normal text, large text, and UI components, with a plain-English verdict. ?fg=&bg=

Price: $0.001 per call, paid in USDC via the x402 protocol (see the x402 security scheme).

get/api/a11y/contrast

Request

  • Base URL: https://api.webbersites.com
  • URL: https://api.webbersites.com/api/a11y/contrast
  • Auth: API key in header X-PAYMENT

Query parameters

fgstring required

Foreground/text color — hex (#111 or #111111) or rgb()

bgstring required

Background color — hex or rgb()

Response

Success

contrast_rationumber
passesobject
summarystring

Changes

No recorded changes to this operation across all 1 revision of this API.