{"uid":"cap_jIFf9g3KtEggqonYHntc_","slug":"vextorium-color-contrast-converter-c5184f2b","name":"Vextorium Color Contrast & Converter","description":"Convert a color between HEX, RGB, HSL, HSV and CMYK and, given a background, compute the WCAG 2.x contrast ratio with AA/AAA pass flags; without background, suggests black or white text.","url":"https://api.vextorium.com/v1/color-contrast?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["color"],"properties":{"fund":{"type":"string","description":"Background color (optional)"},"color":{"type":"string","description":"#RRGGBB, #RGB, rgb() or hsl()"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":["object","null"],"properties":{"fund":{"type":["object","null"],"properties":{"hex":{"type":["string","null"]},"hsl":{"type":["array","null"],"items":{"type":["null","number"]}},"hsv":{"type":["array","null"],"items":{"type":["null","number"]}},"rgb":{"type":["array","null"],"items":{"type":["null","number"]}},"cmyk":{"type":["array","null"],"items":{"type":["null","number"]}},"luminance":{"type":["number","null"]}}},"color":{"type":["object","null"],"properties":{"hex":{"type":["string","null"]},"hsl":{"type":["array","null"],"items":{"type":["null","number"]}},"hsv":{"type":["array","null"],"items":{"type":["null","number"]}},"rgb":{"type":["array","null"],"items":{"type":["null","number"]}},"cmyk":{"type":["array","null"],"items":{"type":["null","number"]}},"luminance":{"type":["number","null"]}}},"contrast":{"type":["object","null"],"properties":{"ratio":{"type":["number","null"]},"ui_components":{"type":["boolean","null"]},"grande_text_AA":{"type":["boolean","null"]},"normal_text_AA":{"type":["boolean","null"]},"grande_text_AAA":{"type":["boolean","null"]},"normal_text_AAA":{"type":["boolean","null"]}}}}}}}}},"responseSchema":{"type":"json","example":{"fund":{"hex":"#0d0e11","hsl":[225,13],"hsv":[225,24],"rgb":[13,14],"cmyk":[24,18],"luminance":0.0044},"color":{"hex":"#00ff66","hsl":[144,100],"hsv":[144,100],"rgb":[0,255],"cmyk":[100,0],"luminance":0.7248},"contrast":{"ratio":14.24,"ui_components":true,"grande_text_AA":true,"normal_text_AA":true,"grande_text_AAA":true,"normal_text_AAA":true}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4Y1IS2ny8Ttqolbe2Xxfv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a color between HEX, RGB, HSL, HSV, and CMYK, and computes WCAG 2.x contrast ratio against a background with AA/AAA accessibility pass flags.","exampleAgentPrompt":"Check if white text (#ffffff) on a dark navy background (#0d1b2a) passes WCAG AA and AAA contrast requirements, and also give me all the color format conversions (RGB, HSL, HSV, CMYK) for both colors.","exampleUseCases":[{"title":"Accessibility audit for a button","prompt":"I'm designing a primary button with background color #0057ff and white text (#ffffff) — does that combination pass WCAG 2.x AA and AAA contrast standards for normal and large text?"},{"title":"Unknown background text color suggestion","prompt":"I have a brand color #e63946 and I'm not sure whether to put black or white text on it — which one is more accessible?"},{"title":"Cross-format color conversion","prompt":"Convert the color hsl(144, 100%, 50%) into HEX, RGB, HSV, and CMYK for me."}],"resultDescription":"Returns full color representations of the input color (and optional background) in HEX, RGB, HSL, HSV, CMYK, and relative luminance. When a background is provided, also returns the WCAG 2.x contrast ratio and boolean pass/fail flags for: normal text AA, normal text AAA, large text AA, large text AAA, and UI components. Without a background, suggests black or white as the accessible text color.","failureModes":["Invalid color format provided — returns error if color string cannot be parsed as #RRGGBB, #RGB, rgb(), or hsl()","Missing required 'color' field — returns validation error","Background color ('fund') in unrecognized format — may fail silently or return null contrast fields","Network or payment failure resulting in 402 or 5xx response"],"whenToPreferThis":"Use this endpoint when you need both color format conversion AND WCAG accessibility contrast evaluation in a single call. It is particularly valuable for UI/UX design automation, accessibility auditing pipelines, or design systems that need to validate color choices against WCAG 2.x AA and AAA standards without calling separate conversion and contrast services.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:53:17.180Z","isFirstParty":false,"canonicalSlug":"vextorium-color-contrast-converter-c5184f2b"}