Calculate WCAG 2
Calculate WCAG 2.x sRGB contrast for one caller-supplied colour pair; no interface-wide accessibility claim is made.
1000 (raw units)
price
6
calls / 30d
4
unique payers
2026-09-17
updated
Provider
api.zfinia.com · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x25e8245f07d5e4873987293dad666afbe56a9608",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "1000",
"maxTimeoutSeconds": 60
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"background": "#ffffff",
"foreground": "#000000",
"large_text": false
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"contrast_ratio": 21,
"large_text": false,
"limitations": [
"Calculation uses WCAG 2.x sRGB contrast; it does not assess full interface accessibility."
],
"request_id": "example-request",
"service_id": "accessibility_contrast_calculator",
"service_version": "1.0.0",
"wcag_aa": true,
"wcag_aaa": true
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"background": {
"pattern": "^#[0-9a-fA-F]{6}$",
"type": "string"
},
"foreground": {
"pattern": "^#[0-9a-fA-F]{6}$",
"type": "string"
},
"large_text": {
"type": "boolean"
}
},
"required": [
"foreground",
"background",
"large_text"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"additionalProperties": false,
"properties": {
"contrast_ratio": {
"type": "number"
},
"large_text": {
"type": "boolean"
},
"limitations": {
"type": "array"
},
"request_id": {
"description": "Delivery request identifier; also returned in x-foundry-request-id.",
"type": "string"
},
"service_id": {
"description": "Canonical service identifier.",
"type": "string"
},
"service_version": {
"description": "Version of the invoked service.",
"type": "string"
},
"wcag_aa": {
"type": "boolean"
},
"wcag_aaa": {
"type": "boolean"
}
},
"required": [
"request_id",
"service_id",
"service_version",
"contrast_ratio",
"wcag_aa",
"wcag_aaa",
"large_text",
"limitations"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Use it
curl
curl "https://api.zfinia.com/x402/v1/accessibility-contrast-calculator" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://api.zfinia.com/x402/v1/accessibility-contrast-calculator");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://api.zfinia.com/x402/v1/accessibility-contrast-calculator")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/7393.json, and this resource appears in /discovery/resources and /discovery/search.