{"uid":"cap_95fK0NZhZ6ta4-j3upnnt","slug":"agent402-tools-image-dominant-color-extractor-188abbbc","name":"agent402.tools Image Dominant Color Extractor","description":"Extract the dominant colors of an image as a palette of hex values with pixel ratios. Send a public image URL or a base64 image, and optionally how many colors (1-10, default 5). Deterministic bucketed quantization; transparent pixels are ignored.","url":"https://agent402.tools/api/image-dominant-color","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"public http(s) image URL (fetched server-side, 5MB cap)"},"image":{"type":"string","description":"alternative: base64 image, optionally a data: URL"},"colors":{"type":"number","description":"palette size, 1-10 (default 5)"}}},"responseSchema":{"type":"json","example":{"width":100,"colors":[{"hex":"#181708","rgb":[24,23,8],"ratio":0.078}],"height":68,"sampled":6240}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nw_sDardc2BUO9H-bnAZo","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts the dominant colors from an image as a palette of hex values with pixel ratios using deterministic bucketed quantization.","exampleAgentPrompt":"Can you pull the top 3 dominant colors from this image as hex values with their pixel ratios? Here's the URL: https://example.com/photo.jpg","exampleUseCases":null,"resultDescription":"A palette of hex color codes (e.g. #3A7BD5) each paired with a pixel ratio indicating how much of the image that color occupies, covering the requested number of colors (1–10, default 5). Transparent pixels are excluded from the analysis.","failureModes":["Image URL is not publicly accessible or returns a non-200 response","Image exceeds the 5MB size cap","Base64 string is malformed or not a valid image","Colors parameter is outside the 1–10 range","Network timeout fetching the remote image","Unsupported image format"],"whenToPreferThis":"Use this endpoint when you need a deterministic, reproducible color palette extraction from an image — especially when you require pixel ratio weighting alongside hex codes. Preferred over ML-based palette tools when consistency across repeated calls matters, or when you want to extract design/brand colors from logos and photos without stochastic variation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:06.185Z","isFirstParty":false}