# Accessible Text Color Checker

> Accessible Text Color Checker is a paid API for AI agents from color-design.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Returns the best text color (black or white) for a given background hex color, including contrast ratios and WCAG AA/AAA compliance results for both options.

## Facts

- Endpoint: GET https://color-design.x402tookit.com/accessible-text-color?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/accessible-text-color-checker-ff23f8f0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0ylFLmnl1uCmrscTAxSDD

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 accessible-text-color-checker-ff23f8f0
```

Example prompt: What's the best text color to use on a #2D6A4F background — black or white — and does it pass WCAG AA and AAA?

## When to prefer this

Use this endpoint when you need a quick, authoritative WCAG-grounded decision on whether black or white text is more accessible on a specific background color. It is ideal for accessibility audits, design systems, UI generators, or any workflow where you need contrast ratios and compliance verdicts without implementing the WCAG luminance math yourself.

## Known failure modes

- Missing or malformed background hex value returns an error
- Invalid hex string (e.g. wrong length or non-hex characters) may return a 400 or error response
- Edge cases like pure white or pure black backgrounds may produce degenerate contrast results
- Service unavailability or payment failure returns a 402 or 5xx error

## How this service works

Best text color (black or white) for a background hex color, with contrast ratios and WCAG AA/AAA results for both.

## Output

Returns a JSON object indicating the best text color (black or white), the contrast ratio for each option, WCAG AA/AAA/AA-Large pass/fail results for both, a human-readable summary, verdict, and reasons explaining the recommendation. Also includes the background color echoed back and optional degraded/disclaimer flags.

## 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": [
      "background"
     ],
     "properties": {
      "background": {
       "type": "string",
       "description": "Background hex color"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "best": {
       "type": [
        "null",
        "string"
       ]
      },
      "black": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "AA": {
         "type": [
          "boolean",
          "null"
         ]
        },
        "AAA": {
         "type": [
          "boolean",
          "null"
         ]
        },
        "ratio": {
         "type": [
          "null",
          "number"
         ]
        },
        "AALarge": {
         "type": [
          "boolean",
          "null"
         ]
        }
       }
      },
      "white": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "AA": {
         "type": [
          "boolean",
          "null"
         ]
        },
        "AAA": {
         "type": [
          "boolean",
          "null"
         ]
        },
        "ratio": {
         "type": [
          "null",
          "number"
         ]
        },
        "AALarge": {
         "type": [
          "boolean",
          "null"
         ]
        }
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/accessible-text-color-checker-ff23f8f0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from color-design.x402tookit.com](https://www.zero.xyz/host/color-design.x402tookit.com/llms.txt)
