{"uid":"cap__pV00ihyoBPKYeGX2vzyh","slug":"color-and-design-tools-hex-color-converter-e314a2e8","name":"Color and Design Tools – Hex Color Converter","description":"Convert a hex color to RGB, HSL, HSV and CMYK with CSS strings and relative luminance, exactly.","url":"https://color-design.x402tookit.com/color-convert?utm_source=zero.xyz","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":["color"],"properties":{"color":{"type":"string","description":"Hex color, e.g. 1a2b3c or #fff"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"css":{"type":["null","object"],"properties":{"hsl":{"type":["null","string"]},"rgb":{"type":["null","string"]}}},"hex":{"type":["null","string"]},"hsl":{"type":["null","object"],"properties":{"h":{"type":["null","number"]},"l":{"type":["null","number"]},"s":{"type":["null","number"]}}},"hsv":{"type":["null","object"],"properties":{"h":{"type":["null","number"]},"s":{"type":["null","number"]},"v":{"type":["null","number"]}}},"rgb":{"type":["null","object"],"properties":{"b":{"type":["null","number"]},"g":{"type":["null","number"]},"r":{"type":["null","number"]}}},"asOf":{"type":["null","string"]},"cmyk":{"type":["null","object"],"properties":{"c":{"type":["null","number"]},"k":{"type":["null","number"]},"m":{"type":["null","number"]},"y":{"type":["null","number"]}}},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"relativeLuminance":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QAHkNYEMZU6cDEY9YUCRW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Convert a hex color code to RGB, HSL, HSV, and CMYK values, including CSS strings and relative luminance.","exampleAgentPrompt":"What are the RGB, HSL, HSV, and CMYK values for the hex color #1a2b3c, and can you also give me the CSS strings and relative luminance?","exampleUseCases":[{"title":"CSS color format conversion for web dev","prompt":"I have the hex color #ff6347 and need its HSL and RGB CSS strings so I can use them directly in my stylesheet — can you convert it?"},{"title":"Accessibility luminance check","prompt":"What's the relative luminance of the hex color #3a7bd5? I need it to check contrast ratios for accessibility compliance."},{"title":"Print design CMYK breakdown","prompt":"I'm preparing artwork for print and need the CMYK values for the brand color #0047AB — can you convert that hex code for me?"}],"resultDescription":"Returns a structured object containing the input hex, RGB (r, g, b), HSL (h, s, l), HSV (h, s, v), and CMYK (c, m, y, k) numeric values, CSS-ready strings for RGB and HSL, the relative luminance value, and optional metadata like source and summary.","failureModes":["Invalid or malformed hex color string returns an error or null values","Missing required 'color' query parameter causes a 400-level error","Hex values outside standard range may return degraded results indicated by the 'degraded' field"],"whenToPreferThis":"Use this endpoint when you need precise, multi-format color space conversion from a hex code — especially when you need relative luminance (for WCAG contrast calculations), CSS-ready strings, or all major color spaces (RGB, HSL, HSV, CMYK) in a single call. Prefer this over manual calculation or generic utilities when accuracy and completeness across all color models is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:08:22.575Z","isFirstParty":false,"canonicalSlug":"color-and-design-tools-hex-color-converter-e314a2e8"}