{"uid":"cap_qR20BH_j0TBXgB5EPatQt","slug":"vextorium-color-contrast-conversion-api-0d61a1d9","name":"Vextorium Color Contrast & Conversion API","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/color-contraste-pago?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"color":{"type":"string","description":"#RRGGBB, #RGB, rgb() or hsl()"},"fondo":{"type":"string","description":"Background color (optional)"}}},"responseSchema":{"type":"json","example":{"color":{"hex":"#00ff66","hsl":[144,100,50],"hsv":[144,100,100],"rgb":[0,255,102],"cmyk":[100,0,60,0],"luminancia":0.7248},"fondo":{"hex":"#0d0e11","hsl":[225,13,6],"hsv":[225,24,7],"rgb":[13,14,17],"cmyk":[24,18,0,93],"luminancia":0.0044},"contraste":{"ratio":14.24,"componentes_ui":true,"AA_texto_grande":true,"AA_texto_normal":true,"AAA_texto_grande":true,"AAA_texto_normal":true}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.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_wyAxJgJ0zH0FW9LtySuA1","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","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 formats and computes WCAG 2.x contrast ratio against an optional background color, returning AA/AAA accessibility pass flags.","exampleAgentPrompt":"What's the WCAG contrast ratio between #00ff66 and #0d0e11, and does it pass AA and AAA for normal text? Also give me the RGB, HSL, and CMYK values for both colors.","exampleUseCases":[{"title":"Accessibility audit for UI color pair","prompt":"Check if my foreground color #3B82F6 is accessible on a white background #FFFFFF — does it pass WCAG AA and AAA for both normal and large text?"},{"title":"Convert brand color to all formats","prompt":"I have a brand color #FF6B35 — can you give me its RGB, HSL, HSV, and CMYK values along with its luminance?"},{"title":"Best text color for a dark card background","prompt":"My card background is #1a1a2e — should I use black or white text to get the best contrast, and what ratio would each give?"}],"resultDescription":"Returns the input color fully converted to HEX, RGB, HSL, HSV, CMYK, and relative luminance. If a background color was provided, also returns the same conversion data for the background, plus a contrast object containing the ratio (e.g. 14.24) and boolean WCAG pass flags for AA normal text, AA large text, AAA normal text, AAA large text, and UI components. Without a background, suggests black or white as the optimal text color.","failureModes":["Invalid color format (not recognized HEX, RGB, or HSL) returns an error","Missing required 'color' field returns a validation error","Malformed background color 'fondo' may cause computation to skip contrast section","Payment not fulfilled results in 402 response from x402 layer"],"whenToPreferThis":"Choose this endpoint when you need both color format conversion and WCAG 2.x accessibility validation in a single call, especially for design system audits, automated accessibility checks in CI/CD pipelines, or generating print-ready CMYK values. It is ideal when you need luminance, contrast ratio, and multiple pass/fail flags (AA, AAA, large/normal text, UI components) together rather than separate tools.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T18:47:59.447Z","isFirstParty":false,"canonicalSlug":"vextorium-color-contrast-conversion-api-0d61a1d9"}