# AgentsToolsHub WCAG Contrast Ratio Checker

> AgentsToolsHub WCAG Contrast Ratio Checker is a paid API for AI agents from agentstoolshub.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-23).

Computes the WCAG 2.1 contrast ratio between a foreground text color and background color, returning pass/fail results for AA and AAA accessibility thresholds for normal text, large text, and UI components.

## Facts

- Endpoint: GET https://agentstoolshub.com/api/v1/media/contrast-check?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentstoolshub-wcag-contrast-ratio-checker-54f8e25a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1yjXt2XrIueJAZ3miQZrW

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentstoolshub-wcag-contrast-ratio-checker-54f8e25a
```

Example prompt: Can you check whether white text (#FFFFFF) on a navy background (#003366) passes WCAG 2.1 AA and AAA contrast requirements for both normal and large text?

## When to prefer this

Choose this endpoint when you need exact WCAG 2.1 luminance-based contrast math with granular AA/AAA pass/fail results for all text sizes and UI component thresholds — ideal for design system validation, automated accessibility audits, or pre-ship color checks where precise compliance verdicts are required rather than approximate visual assessments.

## Known failure modes

- Invalid or unparseable color format provided (e.g. unsupported color string) returns an error
- Missing required foreground or background query parameter returns a 400 bad request
- Malformed hex codes or unsupported color spaces may result in computation errors

## How this service works

Compute the WCAG 2.1 contrast ratio between a text and background color with pass/fail against every accessibility threshold: AA and AAA for normal and large text, plus the 3:1 UI-component minimum. Exact luminance math — the check every design system needs. Use this when an agent needs to contrast ratio + AA/AAA pass/fail.

## Output

Returns the computed WCAG 2.1 contrast ratio as a numeric value, relative luminance for both foreground and background colors, and individual pass/fail results for AA normal text (4.5:1), AA large text (3:1), AAA normal text (7:1), AAA large text (4.5:1), and the 3:1 UI component minimum threshold.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "foreground",
      "background"
     ],
     "properties": {
      "background": {
       "type": "string",
       "description": "Background color"
      },
      "foreground": {
       "type": "string",
       "description": "Text color"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentstoolshub-wcag-contrast-ratio-checker-54f8e25a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentstoolshub.com](https://www.zero.xyz/host/agentstoolshub.com/llms.txt)
