{"uid":"cap_72GCRzwehQgVcWSJgoYRy","slug":"24k-labs-color-converter-53727e55","name":"24K Labs Color Converter","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/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_RMbSnjVdjIHkZLULzXghL","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 compliance against a second color.","exampleAgentPrompt":"Convert #3A86FF to RGB, HSL, HSV, and CMYK, and also check if it passes WCAG AA and AAA contrast against white (#FFFFFF).","exampleUseCases":[{"title":"Design system color normalization","prompt":"I have the hex color #FF6B6B and I need it expressed in RGB, HSL, HSV, and CMYK formats so I can use it across different tools in my design system."},{"title":"Accessibility audit for text on background","prompt":"Does my dark navy text (#1A1A2E) meet WCAG AA and AAA contrast requirements when used on a light gray background (#F5F5F5)?"},{"title":"Cross-format color translation for brand guidelines","prompt":"Our brand color is hsl(210, 100%, 56%) — can you convert that to hex, RGB, HSV, and CMYK so we have all formats for the brand style guide?"}],"resultDescription":"Returns the input color expressed in all five formats (hex, RGB, HSL, HSV, CMYK). If a second color is provided, also returns the WCAG 2.1 contrast ratio as a numeric value and boolean pass/fail flags for AA (4.5:1) and AAA (7:1) thresholds.","failureModes":["Invalid color value format returns a 400 error","Unsupported color space input returns a parsing error","Malformed hex string (wrong length or invalid characters) causes a validation failure","Missing required color input field returns a missing parameter error"],"whenToPreferThis":"Choose this endpoint when you need to translate a color across multiple color spaces in a single call, especially when you also want to check accessibility compliance (WCAG) against a second color simultaneously. It is more efficient than calling separate conversion and contrast endpoints. Prefer this over the sibling WCAG-only endpoint when you need the color format conversions as well as accessibility data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:51:36.480Z","isFirstParty":false}