{"uid":"cap_dG32bPrW2-7F7wuZwn2mN","slug":"24k-labs-color-converter-with-wcag-contrast-662a78f7","name":"24K Labs Color Converter with WCAG Contrast","description":"Convert a color across hex/rgb/hsl/hsv/cmyk and (optionally) compute the WCAG contrast ratio and AA/AAA pass against a second color.","url":"https://api.24klabs.ai/api/v1/color-convert","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"color":{"type":"string"},"against":{"type":"string"}}},"responseSchema":{"type":"json","example":{"hex":"#3366cc","rgb":[51,102,204]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eVuEECeBJJMWNc-ycLNp_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","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 optionally computes the WCAG 2.1 contrast ratio and AA/AAA accessibility pass/fail against a second color.","exampleAgentPrompt":"Convert the color #3A86FF to RGB and HSL, and also check if it passes WCAG AA and AAA contrast against a white background (#FFFFFF).","exampleUseCases":[{"title":"Design token format migration","prompt":"I have the color hsl(210, 100%, 56%) from our old design system and need it converted to both hex and CMYK for our print team — can you do that?"},{"title":"Accessibility audit for UI components","prompt":"Does the text color #1A1A2E pass WCAG AA and AAA accessibility standards when placed on a background of #F5F5F5?"},{"title":"Cross-format color reference sheet","prompt":"Convert rgb(58, 134, 255) into all formats — hex, HSL, HSV, and CMYK — so I can document it fully in our style guide."}],"resultDescription":"Returns the input color expressed in the requested output format(s) (hex, RGB, HSL, HSV, CMYK). If a second color is provided, also returns the WCAG 2.1 contrast ratio (a numeric value like 4.52:1) and boolean AA and AAA pass/fail flags for both normal and large text sizes.","failureModes":["Invalid color value format returns a 400 error","Unsupported color space or format name returns an error","Missing required color input returns validation error","Malformed hex (e.g. wrong length) causes parse failure"],"whenToPreferThis":"Choose this endpoint when you need to convert a color between multiple color spaces (hex, RGB, HSL, HSV, CMYK) in a single call, especially when you also want WCAG contrast accessibility checking bundled together. Prefer this over standalone WCAG-only endpoints when format conversion is also needed. Ideal for design systems, accessibility audits, and cross-platform color normalization workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:50:42.212Z","isFirstParty":false}