{"uid":"cap_tjV9BbAJbbIX6PRj9cqRD","slug":"delx-commerce-hex-color-luminance-b5ad6838","name":"Delx Commerce — Hex Color Luminance","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/hex-color-luminance?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"hex":{"type":"string","description":"Hex color #RRGGBB"}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-hex-color-luminance/v1","luminance":0.01502241942073589}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_U9HS4I9zt1HQrs1WmLVA9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the relative luminance of a hex color code (#RRGGBB) and returns it as a float value.","exampleAgentPrompt":"What's the relative luminance of the color #ff5733?","exampleUseCases":[{"title":"WCAG contrast accessibility check","prompt":"I need to check if my text color #1a1a1a has enough contrast against a white background — can you get the luminance for #1a1a1a so I can calculate the contrast ratio?"},{"title":"Dark vs. light color classification","prompt":"Is the brand color #4b0082 considered dark or light? Calculate its luminance so I can decide whether to put white or black text on top of it."},{"title":"Color palette luminance ranking","prompt":"I'm building a color palette and I need to sort my colors by brightness — start by getting the luminance for #e8f4f8."}],"resultDescription":"Returns a JSON object with a schema identifier ('delx/util-hex-color-luminance/v1') and a 'luminance' float representing the relative luminance of the input hex color, in the range 0 (black) to 1 (white), conforming to standard luminance calculation (e.g. WCAG 2.x).","failureModes":["Invalid or malformed hex string (e.g. missing #, wrong length) — likely returns a 4xx error or null luminance","Hex string with alpha channel (8-digit) may not be supported","Missing 'hex' field in request body — likely returns validation error","Network or payment failure via x402 protocol — endpoint may return 402 Payment Required if payment is not correctly submitted"],"whenToPreferThis":"Use this endpoint when you need a fast, cheap, single-call computation of relative luminance for a hex color, particularly for accessibility checks (WCAG contrast ratios), dynamic UI theming decisions, or color sorting by perceived brightness. It is a pay-per-call API requiring no signup, making it ideal for agent workflows that occasionally need color luminance without standing up a local color library.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:50.992Z","isFirstParty":false,"canonicalSlug":"delx-commerce-hex-color-luminance-b5ad6838"}