{"uid":"cap_Xvz1CNP9bEmhwXxHfEQtQ","slug":"wcag-color-contrast-ratio-calculator-db6d8197","name":"WCAG Color Contrast Ratio Calculator","description":"Calculate contrast ratio between two HEX colors and evaluate WCAG AA and AAA text thresholds.","url":"https://x402-zoo.lolagent.workers.dev/api/color-contrast","method":"GET","headers":{},"bodySchema":{"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":[],"properties":{"background":{"type":"string"},"foreground":{"type":"string"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9u0xyLjyx-zbIX5dUfxya","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the contrast ratio between two HEX colors and evaluates WCAG AA and AAA accessibility thresholds for text.","exampleAgentPrompt":"Can you check whether white text (#FFFFFF) on a dark blue background (#1A2B6D) passes WCAG AA and AAA contrast standards?","exampleUseCases":[{"title":"Accessibility audit for brand colors","prompt":"I'm building a website with a navy blue background (#003366) and want to use white (#FFFFFF) text — does this combination pass WCAG AA and AAA contrast requirements?"},{"title":"Dark mode UI contrast check","prompt":"For my app's dark mode, I'm using #121212 as the background and #B0B0B0 for body text — can you tell me the contrast ratio and whether it meets WCAG accessibility standards?"},{"title":"CTA button readability validation","prompt":"My call-to-action button uses a yellow background (#FFD700) with dark gray text (#333333) — does this pass WCAG AA contrast for normal and large text?"}],"resultDescription":"Returns the computed contrast ratio (a number like 4.5:1) between the two HEX colors, along with boolean pass/fail results for WCAG AA (minimum 4.5:1 for normal text) and AAA (7:1) thresholds, enabling accessibility compliance decisions.","failureModes":["Invalid or missing HEX color values return an error","HEX colors provided without # prefix may be rejected or misinterpreted","Non-HEX color formats (RGB, HSL, named colors) are not supported","Missing foreground or background parameter causes a validation error"],"whenToPreferThis":"Use this endpoint when you need a quick, deterministic WCAG contrast ratio check for two specific HEX colors, especially during UI/UX design, automated accessibility audits, or CI/CD pipelines. Prefer this over manual calculations or browser dev tools when building automated accessibility workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:53:08.401Z","isFirstParty":false}