{"uid":"cap_8sD88InBXVFHqnTXGpG5G","slug":"color-contrast-ratio-checker-ad5518fb","name":"Color Contrast Ratio Checker","description":"WCAG 2 contrast ratio between a text colour and a background colour, with pass/fail for AA and AAA at normal and large text sizes. Use to check that a design is readable.","url":"https://agent-data-tools.revmesh2074.workers.dev/color/contrast?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["fg","bg"],"properties":{"bg":{"type":"string","description":"Background colour"},"fg":{"type":"string","description":"Text colour"}}},"responseSchema":{"type":"object","properties":{"ratio":{"type":"number"},"aaLarge":{"type":"boolean"},"aaNormal":{"type":"boolean"},"aaaLarge":{"type":"boolean"},"aaaNormal":{"type":"boolean"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hUtnx6dsAWcaFLuOWyksd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the WCAG contrast ratio between a foreground (text) color and background color, returning AA and AAA accessibility pass/fail results.","exampleAgentPrompt":"Check the WCAG contrast ratio between text color #FFFFFF and background color #1A3C5E — does it pass AA and AAA accessibility standards for both normal and large text?","exampleUseCases":[{"title":"Brand color accessibility audit","prompt":"I'm designing a website using our brand colors — dark navy #0D2B4E as the background and cream #F5F0E8 as the text color. Can you check if that combination meets WCAG AA and AAA accessibility standards?"},{"title":"UI dark mode contrast check","prompt":"My dark mode theme uses #121212 as the background and #B0BEC5 as the text color — does that pass WCAG AA contrast requirements for normal-sized body text?"},{"title":"Design system compliance validation","prompt":"Before we ship, can you verify that our button label color #FFFFFF on our primary button background #E53935 passes WCAG AA contrast for large text?"}],"resultDescription":"Returns a JSON object with the numeric contrast ratio (e.g. 4.54) and four boolean flags: aaLarge, aaNormal, aaaLarge, and aaaNormal — indicating whether the color pair passes WCAG 2.1 AA and AAA thresholds for large and normal text respectively.","failureModes":["Missing fg or bg query parameters returns an error","Invalid or malformed color strings (non-hex, unsupported formats) may return an error or unexpected ratio","Very similar colors return low ratios and all false flags","Payment failure (402) if USDC balance insufficient — call is not charged on failure"],"whenToPreferThis":"Choose this endpoint when you need a fast, no-account-required programmatic WCAG contrast ratio check paid per-call in USDC. Ideal for AI agents automating accessibility audits, design system validation pipelines, or one-off color pair checks without setting up a dedicated accessibility API key.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T08:14:47.562Z","isFirstParty":false,"canonicalSlug":"color-contrast-ratio-checker-ad5518fb"}