{"uid":"cap_luzDJUKPyRgoPm-MLoOES","slug":"forgemesh-contrast-dark-mode-color-checker-d7cf247c","name":"ForgeMesh Contrast & Dark-Mode Color Checker","description":"Contrast and dark-mode checker for any hex or rgb() input: returns whether a color reads as light or dark and which text color, black or white, stays legible on top of it, alongside full hex/RGB/HSL conversions. Useful for accessible UI generation, theme switchers, and design-system tooling that can't afford a manual eyeball check.","url":"https://x402.forgemesh.io/contrast-color-checker","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"color":{"type":"string","description":"#RRGGBB or rgb(r,g,b)"}}},"responseSchema":{"type":"json","example":{"hex":"#5eead4","hsl":{"h":171,"l":64,"s":77},"rgb":{"b":212,"g":234,"r":94},"is_dark":false,"contrast_text":"#000000"}},"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_pXh1CoZfU-qEjeUU5_ZB4","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":"Accepts a hex or RGB color value and returns whether it reads as light or dark, the best text color (black or white) for legibility on top of it, and full color conversions in hex, RGB, and HSL formats.","exampleAgentPrompt":"Is the color #3a86ff considered light or dark, and should I use black or white text on top of it? Also give me its RGB and HSL equivalents.","exampleUseCases":[{"title":"Accessible button text color picker","prompt":"I'm building a UI and need to know whether to use black or white text on a button with background color #ff6b6b — can you check the contrast and tell me which is more legible?"},{"title":"Dark-mode theme switcher logic","prompt":"My theme switcher needs to handle rgb(30, 30, 30) — is that color considered dark or light, and what text color should I layer on it for readability?"},{"title":"Design token hex-to-HSL conversion","prompt":"I have a brand color #a8dadc and I need to know if it's light or dark, the best text color to put on it, and what it looks like in HSL format for our design system tokens."}],"resultDescription":"Returns a classification of the input color as 'light' or 'dark', a recommended text color ('black' or 'white') that maximizes legibility when rendered on top of the input color, and full color representations including the hex code, RGB triplet, and HSL values.","failureModes":["Invalid or malformed color string (e.g. missing # for hex, non-numeric RGB channels) — likely returns a 4xx error","Out-of-range RGB values (e.g. rgb(300, 0, 0)) may cause an error or undefined behavior","Missing 'color' field in request body — returns validation error","Payment failure or insufficient USDC balance — request rejected before processing"],"whenToPreferThis":"Use this endpoint when you need a programmatic, per-call determination of light/dark classification and accessible text color (black vs white) for an arbitrary user-supplied color, especially within automated design-system pipelines, theme generators, or accessible UI builders where manual eyeballing isn't feasible. Prefer it over a local calculation when you also need simultaneous hex/RGB/HSL conversion in one response, or when operating within an x402 micropayment-native agent workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:00:05.846Z","isFirstParty":false}