{"uid":"cap_Mkwio51FTUYy1QMYwrp0p","slug":"x402-image-tools-color-palette-extraction-cb8cb1af","name":"x402 Image Tools – Color Palette Extraction","description":"The dominant colors of an image with their share of it, and its average color, as hex and RGB, for palettes, theming and search.","url":"https://7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws/v1/colors?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":["url"],"properties":{"url":{"type":"string","description":"https URL of a JPEG, PNG, WebP, AVIF, GIF, TIFF or SVG image (up to 20 MB, 40 megapixels)"},"count":{"type":"integer","description":"how many colors (1-10, default 5)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"colors":{},"average":{}}}}}}},"responseSchema":{"type":"json","example":{"colors":[{"hex":"#2f2a22","rgb":[47,42,34],"share":0.31}],"average":"#7a6b55"}},"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_DRLVTSg0S-vRTl_6bCqIU","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":"Extracts dominant colors and the average color from an image URL, returning each color as hex and RGB with its share of the image.","exampleAgentPrompt":"Can you extract the top 5 dominant colors from this image — https://example.com/photo.jpg — and give me each one as a hex code and RGB value along with how much of the image it covers?","exampleUseCases":[{"title":"Auto-theming a product page","prompt":"I'm building a product page and want to auto-generate a color theme from the product image at https://store.example.com/product-hero.jpg — can you pull the top 3 dominant colors as hex codes so I can use them for the background and accent colors?"},{"title":"Color-based image search indexing","prompt":"I need to index a batch of photos by their dominant colors for a visual search engine. Start with https://cdn.example.com/landscape.jpg — give me the top 5 colors with their hex, RGB, and what share of the image they take up."},{"title":"Brand palette verification","prompt":"Can you check what the dominant colors are in our logo image at https://brand.example.com/logo.png and tell me the average color too? I want to make sure it matches our brand palette of blues and whites."}],"resultDescription":"A JSON object containing an array of dominant colors (each with hex string, RGB array, and share as a decimal fraction) and the overall average color as a hex string. For example: {\"colors\":[{\"hex\":\"#2f2a22\",\"rgb\":[47,42,34],\"share\":0.31}],\"average\":\"#7a6b55\"}.","failureModes":["Invalid or inaccessible image URL returns an error","Image exceeds 20 MB or 40 megapixel limit","Unsupported image format (only JPEG, PNG, WebP, AVIF, GIF, TIFF, SVG accepted)","Count parameter outside 1-10 range causes validation error","Network timeout fetching the remote image","Payment failure or insufficient USDC balance blocks the request"],"whenToPreferThis":"Choose this endpoint when you need structured color data (hex, RGB, share) from a remote image URL for use in theming, palette generation, or color-based search indexing. It is purpose-built for color extraction and returns richer metadata (average color + per-color share) than generic image analysis APIs. Prefer it over general vision APIs when you specifically need color palette output without object detection or captioning.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:35:16.347Z","isFirstParty":false,"canonicalSlug":"x402-image-tools-color-palette-extraction-cb8cb1af"}