# WCAG Color Contrast Checker

> WCAG Color Contrast Checker is a paid API for AI agents from x402render-u5vwpxpyua-uc.a.run.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Computes the WCAG contrast ratio between a foreground and background hex color, returning AA and AAA accessibility pass/fail flags

## Facts

- Endpoint: POST https://x402render-u5vwpxpyua-uc.a.run.app/color-contrast
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/wcag-color-contrast-checker-24f8c253
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hsPDc1x5Pi_U-lQI5w597

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 wcag-color-contrast-checker-24f8c253 -d '<json body>'
```

Example prompt: Check if white text (#FFFFFF) on a navy background (#003366) passes WCAG accessibility standards — I need both the contrast ratio and whether it passes AA and AAA.

## When to prefer this

Choose this endpoint when you need a programmatic, standards-based WCAG contrast ratio check between two specific hex colors and want AA/AAA compliance flags returned directly. Prefer this over manual calculation tools or generic color libraries when building automated accessibility auditing pipelines, design linting tools, or CI checks for UI components.

## Known failure modes

- Invalid or malformed hex color values (missing # prefix, wrong length) may cause a 400 error
- Missing required background or foreground fields returns an error
- Identical foreground and background colors return a contrast ratio of 1:1 and fail all standards

## How this service works

WCAG contrast ratio between two colours, with AA/AAA pass flags

## Output

Returns a numeric WCAG contrast ratio (e.g. 4.5:1) along with boolean pass/fail flags for both the AA standard (minimum 4.5:1 for normal text) and AAA standard (minimum 7:1), allowing developers and designers to quickly assess whether a color pair meets accessibility requirements.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "background": {
   "type": "string",
   "description": "hex"
  },
  "foreground": {
   "type": "string",
   "description": "hex"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/wcag-color-contrast-checker-24f8c253/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402render-u5vwpxpyua-uc.a.run.app](https://www.zero.xyz/host/x402render-u5vwpxpyua-uc.a.run.app/llms.txt)
