{"uid":"cap_hLDEPeJPZzthrXnyuWEXC","slug":"bacon-services-image-palette-extractor-aeda5d94","name":"Bacon Services: Image Palette Extractor","description":"Image Palette: Returns the colours one image is mostly made of, as JSON: up to count colours, most common first, each as a hex value with its share of the image (0 to 1) and whether it is a neutral (near white, near black or grey). The image is sampled at up to 160 pixels on its longest side, so small details do not count.","url":"https://baconservices.com/api/agent-commerce/v1/capabilities/image-palette/execute?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"count":{"type":"integer","default":6,"maximum":12,"minimum":1,"description":"The most colours to return."},"image_url":{"type":"string","format":"uri","description":"A public https URL of a PNG, JPEG or WebP image."},"image_base64":{"type":"string","description":"The image bytes, base64-encoded.","contentEncoding":"base64"},"include_neutrals":{"type":"boolean","default":true,"description":"Count near-whites, near-blacks and greys too. With false, shares are of the coloured part of the image only."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5g5D0-ggp0JybV2EsgRVO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts the dominant color palette from an image, returning up to 12 colors as hex values with their proportional share and neutral classification.","exampleAgentPrompt":"Can you extract the top 5 dominant colors from this product photo — https://example.com/product.jpg — and tell me each one as a hex code with its share of the image? Skip neutrals so I only see the real colors.","exampleUseCases":[{"title":"Brand palette extraction from logo","prompt":"Pull the top 6 colors from our company logo at https://mybrand.com/logo.png and give me each as a hex code with how much of the image it covers — I want to build a brand color guide."},{"title":"E-commerce product color tagging","prompt":"Analyze this product image at https://shop.example.com/jacket.jpg and return the 4 most prominent non-neutral colors with their hex codes and share percentages so I can tag it in our catalog."},{"title":"Art print color mood check","prompt":"Look at this painting image — https://gallery.example.com/sunset-print.webp — and tell me the 8 dominant colors including neutrals, so I can see if it's warm-toned or cool-toned based on the palette breakdown."}],"resultDescription":"A JSON array of up to the requested number of color entries, sorted by prevalence, each containing: a hex color code (e.g. '#3a7bd5'), a share value between 0 and 1 indicating what fraction of the image that color represents, and a boolean indicating whether the color is considered neutral (near-white, near-black, or grey). The image is internally downsampled to 160px on its longest side before analysis.","failureModes":["Image URL is not publicly accessible or returns a non-200 response — endpoint cannot fetch image","Image format is not PNG, JPEG, or WebP — unsupported format error","base64 string is malformed or does not decode to a valid image — decoding error","count parameter outside the 1–12 range — validation error","Both image_url and image_base64 provided or neither provided — ambiguous or missing input error","Network timeout fetching remote image URL","Image is extremely small (e.g. 1x1 pixel) — may return fewer colors than requested"],"whenToPreferThis":"Choose this endpoint when you need to programmatically extract the dominant color palette from any image — particularly useful for brand auditing, product catalog enrichment, design system generation, or UI theming. It is lightweight, fast, and cost-effective at $0.01 per call. Prefer it over full computer-vision APIs when color distribution is the only signal needed, rather than object detection or semantic understanding. The neutral-filtering option makes it especially useful when you want to isolate chromatic brand colors from photographic backgrounds.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:08:23.736Z","isFirstParty":false,"canonicalSlug":"bacon-services-image-palette-extractor-aeda5d94"}