{"uid":"cap_MtfioOtav7ldnwboR8Qpc","slug":"halowerk-medien-image-colour-palette-extractor-9adacaa1","name":"HALOWERK Medien Image Colour Palette Extractor","description":"Takes an image by URL or inline base64 and returns its colour palette: up to sixteen colours, each with the share of the visible area it covers, its HEX and sRGB values, its OKLCH coordinates, and the WCAG 2.1 contrast ratio against white, against black and against every other colour in the palette. The grouping runs in OKLab rather than RGB, because distance in RGB does not match what an eye sees — it merges dark blue with black and splits two yellows nobody tells apart.","url":"https://medien.halowerk.com/v1/image-palette?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"source":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Public http(s) URL of the image."},"filename":{"type":"string","maxLength":260},"content_base64":{"type":"string","maxLength":12000000,"description":"The image inline, base64."}},"description":"The image. Either url or content_base64, not both.","additionalProperties":false},"max_colors":{"type":"integer","default":6,"maximum":16,"minimum":2,"description":"Upper bound on palette size. Clusters whose share falls below min_share_pct are merged into their nearest neighbour, so the answer can contain fewer."},"min_share_pct":{"type":"number","default":1,"maximum":50,"minimum":0,"description":"Minimum area share in percent for a colour to stay in the palette. Below this it is merged into the perceptually nearest remaining colour and counted under merged_clusters."},"include_contrast":{"type":"boolean","default":true,"description":"Return WCAG 2.1 contrast ratios: against white and black per colour, and the full pairwise matrix."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Ey2Shx9L5bCfGOBn1GEnR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts a perceptually accurate colour palette (up to 16 colours) from an image, returning HEX, sRGB, OKLCH values, area coverage percentages, and WCAG 2.1 contrast ratios","exampleAgentPrompt":"Can you extract the colour palette from this image — https://example.com/brand-photo.jpg — give me up to 8 colours with their hex codes, OKLCH values, and area coverage percentages, and include the WCAG contrast ratios so I can check accessibility?","exampleUseCases":[{"title":"Brand colour extraction for style guide","prompt":"Pull the dominant colours from our logo at https://mybrand.com/assets/logo.png — I want up to 6 colours with their hex codes and what percentage of the image each one covers, so I can build a style guide."},{"title":"Accessibility audit of UI screenshot","prompt":"Here's a base64-encoded screenshot of our app's login screen — can you extract up to 10 colours and give me the WCAG 2.1 contrast ratios between all of them, against white and against black? I need to check if we're meeting accessibility standards."},{"title":"Artwork palette inspiration for design project","prompt":"I'm designing a poster inspired by this painting — https://museum.example.org/collection/monet-waterlilies.jpg — can you extract up to 16 perceptually distinct colours with their hex and OKLCH values, and tell me how much of the image each colour covers?"}],"resultDescription":"Returns a palette of up to 16 colours (may be fewer if clusters fall below the minimum share threshold), each with: HEX code, sRGB triplet, OKLCH coordinates, percentage share of the visible image area, WCAG 2.1 contrast ratio against white, WCAG 2.1 contrast ratio against black, and (if requested) a full pairwise contrast ratio matrix between every colour in the palette. Also reports the number of clusters that were merged due to being below the minimum share threshold.","failureModes":["Image URL is unreachable or returns a non-image response — endpoint cannot fetch source","base64 payload exceeds 12MB limit — request rejected","Both url and content_base64 provided simultaneously — validation error","max_colors set outside 2–16 range — validation error","min_share_pct set outside 0–50 range — validation error","Image format not supported — processing failure","Network timeout fetching remote image URL"],"whenToPreferThis":"Choose this endpoint when you need perceptually accurate colour extraction that respects how the human eye perceives colour differences — using OKLab clustering rather than RGB, so it won't conflate dark blue with black or split visually identical yellows. It is especially valuable when you also need WCAG 2.1 accessibility contrast data alongside the palette, or when you need OKLCH coordinates for modern CSS colour workflows. Prefer it over generic colour quantization tools when perceptual accuracy and accessibility compliance data matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-16T18:32:47.870Z","isFirstParty":false,"canonicalSlug":"halowerk-medien-image-colour-palette-extractor-9adacaa1"}