{"uid":"cap_WNU0-zq09M835qTCZMTKd","slug":"css-color-name-lookup-reverse-lookup-d76e5dce","name":"CSS Color Name Lookup & Reverse Lookup","description":"Two-way CSS named color tool. Pass a name (e.g. \"rebeccapurple\") to get its canonical RGB/hex; pass a hex/rgb color to get the closest CSS named color and the distance (RGB Euclidean, 0 = exact match). Useful when an agent needs to convert designe...","url":"https://agent402.tools/api/color-name","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"color":{"type":"string","description":"A CSS color name OR any hex/rgb/hsl/oklch color to find the nearest name for."}}},"responseSchema":{"type":"json","example":{"hex":"#6a5acd","rgb":{"b":205,"g":90,"r":106},"name":"slateblue","input":"#6a5acd","isNamed":true,"distance":0}},"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__iWw54ZX_fTkCHxbaVOAU","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":"Converts a CSS color name to its hex/RGB value, or finds the closest CSS named color for any hex/RGB/HSL/OKLCH input with distance score","exampleAgentPrompt":"What CSS named color is closest to #E040FB, and how far off is it exactly?","exampleUseCases":null,"resultDescription":"For a name input: the canonical hex and RGB values for that CSS named color. For a hex/rgb/hsl/oklch input: the closest CSS named color, its canonical hex/RGB, and the RGB Euclidean distance (0 = exact match).","failureModes":["Unrecognized or misspelled color name returns an error or empty result","Invalid hex/RGB format causes a parsing error","Very unusual color values may have a large distance to the nearest named color, potentially misleading","Network or payment failure returns a non-200 status"],"whenToPreferThis":"Use this endpoint when you need to resolve a CSS color name to its canonical hex/RGB value, or when you need to find the human-readable CSS color name closest to an arbitrary color value in any format (hex, rgb, hsl, oklch). Ideal for design tools, code generation, accessibility checks, or any workflow that needs to bridge CSS named colors and numeric color representations.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:03.982Z","isFirstParty":false}