{"uid":"cap_tiKl4ccYc0rEGenQVMkT0","slug":"delx-hex-color-luminance-5690f270","name":"Delx Hex Color Luminance","description":"Relative luminance of a #RRGGBB color. Call when contrast checks without image decode. Returns luminance as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.","url":"https://api.delx.ai/api/v1/x402/hex-color-luminance","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_Cbby23N4WdSU3Woyw_6_T","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 value (#RRGGBB) and returns a float between 0 and 1.","exampleAgentPrompt":"What's the relative luminance of the hex color #1A2B3C? I need to check if it's dark enough for contrast compliance.","exampleUseCases":[{"title":"WCAG contrast ratio check","prompt":"I'm building a UI and need to verify text contrast — can you calculate the luminance of #FFFFFF and #1C1C1E so I can compute their contrast ratio for WCAG AA compliance?"},{"title":"Auto text color on dynamic backgrounds","prompt":"My app dynamically picks background colors from user avatars. Can you get the luminance of #F4C430 so I can decide whether to put black or white text on top of it?"},{"title":"Accessibility audit for brand palette","prompt":"I need to audit our brand colors for accessibility — can you compute the luminance of #0057B8 so I can see if it meets the minimum contrast threshold against a white background?"}],"resultDescription":"Returns a JSON object with a schema identifier ('delx/util-hex-color-luminance/v1') and a 'luminance' field containing a float between 0 (absolute black) and 1 (absolute white) representing the relative luminance of the input hex color per WCAG standards.","failureModes":["Invalid or malformed hex string (missing #, wrong length, non-hex characters) — likely returns a 4xx error","Missing 'hex' field in request body — likely returns a 400 validation error","Hex shorthand (e.g. #FFF instead of #FFFFFF) may not be supported — use full 6-digit form"],"whenToPreferThis":"Choose this endpoint when you need a fast, single-call luminance value for a specific hex color — especially for accessibility checks, contrast ratio computation, or deciding between light and dark foreground text. It is simpler and cheaper than full color-analysis APIs when all you need is the scalar luminance float.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:16:45.417Z","isFirstParty":false}