# BRAINIAC Color Contrast Check API

> BRAINIAC Color Contrast Check API is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-17).

Checks HTML or a URL for WCAG color contrast accessibility issues, returning contrast ratios, failing elements, and compliance status.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/accessibility/color-contrast-check?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-color-contrast-check-api-738fdb17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YRIBbk1RS7jyMuvSxdEyP

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 brainiac-color-contrast-check-api-738fdb17 -d '<json body>'
```

Example prompt: Can you check my webpage at https://example.com for WCAG color contrast accessibility issues and tell me which elements fail and what their contrast ratios are?

## When to prefer this

Choose this endpoint when you need a fast, no-account, pay-per-call WCAG color contrast audit of a URL or raw HTML snippet. It is ideal for CI/CD pipelines, automated accessibility QA, or agent workflows that need machine-readable contrast issue lists with remediation guidance. It is not a full WCAG conformance scanner — prefer a browser-based tool or manual review for JavaScript-heavy pages or inherited stylesheet colors.

## Known failure modes

- URL is unreachable or returns a non-200 response — check will fail or return no results
- HTML is empty or malformed — may produce incomplete results
- Both url and html omitted — request is rejected
- Contrast cannot be determined when colors are inherited or set via external stylesheets — flagged as manual checks
- JavaScript-rendered content not analyzed — only static HTML is checked
- Page uses CSS variables or computed styles — those pairs cannot be checked statically

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

A JSON object containing: a list of contrast issues with element type, issue code (e.g. contrast_below_threshold, contrast_incomplete), kind (confirmed vs manual), explanation, and remediation advice; a wcagCompliance boolean; overall status; source (html or url); warnings; limitations of the static check; and a checkedAt timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "pattern": "^https?:\\/\\/\\S+$",
   "maxLength": 2000,
   "minLength": 8
  },
  "html": {
   "type": "string",
   "maxLength": 200000,
   "minLength": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "",
  "issues": [
   {
    "code": "contrast_below_threshold",
    "kind": "confirmed",
    "element": "p",
    "explanation": "The contrast ratio is 1:1 from the colours on this element. It is below 3:1, the AA threshold used for large text.",
    "remediation": "Change one of the colours so normal text reaches 4.5:1 and large text reaches 3:1."
   },
   {
    "code": "contrast_incomplete",
    "kind": "manual",
    "element": "p",
    "explanation": "Only one of the foreground and background colours is written on this element. The other colour was not guessed.",
    "remediation": "Set both color and background-color on the element, or check the pair in a browser."
   },
   {
    "code": "stylesheet_contrast_not_checked",
    "kind": "manual",
    "element": "document",
    "explanation": "Stylesheet, inherited, and user-agent colours were not calculated.",
    "remediation": "Check those pairs in a browser. A passing inline pair does not make the page conform."
   }
  ],
  "source": "html",
  "status": "checked",
  "warnings": [],
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "limitations": [
   "This is a static HTML check. It is not a WCAG conformance claim.",
   "JavaScript is not run, so states that appear only after interaction are not seen.",
   "Contrast is calculated only when both colours are written on the same element.",
   "Checks marked manual need a browser or a person. They are not failures."
  ],
  "wcagCompliance": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-color-contrast-check-api-738fdb17/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
