# Tanod Color Contrast Checker

> Tanod Color Contrast Checker is a paid API for AI agents from tanod.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Calculates the WCAG 2.x contrast ratio between a foreground and background color and returns AA/AAA pass/fail results for normal text, large text, and UI components.

## Facts

- Endpoint: POST https://tanod.dev/v1/color/contrast?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanod-color-contrast-checker-095bb58f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_udN-geRwwW-ij8Dl-fB0Y

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 tanod-color-contrast-checker-095bb58f -d '<json body>'
```

Example prompt: Check the WCAG contrast ratio between #777777 text on a #ffffff background — tell me whether it passes AA and AAA for both normal and large text, and for UI components.

## When to prefer this

Use this endpoint when you need a precise, standards-compliant WCAG 2.x contrast ratio check including separate pass/fail judgments for normal text, large text, and UI components — especially when building accessibility auditing workflows, design review agents, or automated CI checks for color compliance. It supports the full range of CSS color formats including hex, rgb(), rgba(), hsl(), hsla(), and named colors, making it versatile for any web design context.

## Known failure modes

- Invalid or unrecognized CSS color format returns an error
- Missing foreground or background field returns a validation error
- Color strings exceeding 64 characters are rejected
- Ambiguous color names may be resolved differently than expected

## How this service works

Check WCAG color contrast: ratio and AA / AAA pass or fail for normal text, large text and UI components (utilpeek, Tanod). Use when an agent must check whether text and background colors meet WCAG AA or AAA contrast.

## Output

Returns a JSON object with the contrast ratio (rounded and unrounded), the resolved RGBA values of both colors, whether they were composited, and separate pass/fail booleans for WCAG AA and AAA at normal text, large text, and UI component thresholds, plus a human-readable ratio string like '4.48:1' and a note explaining WCAG 2.x thresholds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "background": {
   "type": "string",
   "maxLength": 64,
   "minLength": 1,
   "description": "The background color it sits on, in the same CSS color formats."
  },
  "foreground": {
   "type": "string",
   "maxLength": 64,
   "minLength": 1,
   "description": "The text or UI color, a CSS color: hex (#rgb, #rrggbb, #rrggbbaa), rgb() / rgba(), hsl() / hsla() or a CSS color name."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "WCAG 2.x contrast; pass/fail compares the unrounded ratio. Large text: at least 18 pt (24 px), or 14 pt (about 18.7 px) bold. Thresholds: AA 4.5 normal / 3 large, AAA 7 / 4.5, UI components and graphics 3 (SC 1.4.11).",
  "ratio": 4.48,
  "background": "#ffffffff",
  "composited": false,
  "foreground": "#777777ff",
  "large_text": {
   "aa": true,
   "aaa": false
  },
  "ratio_text": "4.48:1",
  "normal_text": {
   "aa": false,
   "aaa": false
  },
  "ui_components": {
   "aa": true
  },
  "ratio_unrounded": 4.478089
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-color-contrast-checker-095bb58f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tanod.dev](https://www.zero.xyz/host/tanod.dev/llms.txt)
