{"openapi":"3.1.0","info":{"title":"Color Palette API","version":"1.0.0","description":"Extract the dominant colour palette from any image. Pass an image URL (we fetch it) or a base64 image and get back its main colours — each as a hex code, RGB triplet and the percentage of the image it covers — plus the single dominant colour and the overall average colour. Choose how many colours to return (1 to 16). The image is decoded and downscaled locally and the colours are quantised on the fly; nothing is stored and there is no third-party service. Supports PNG, JPEG, BMP, TIFF and GIF. Live. 2 endpoints. Built for theming and design tools, auto-generating UI colours from artwork or product photos, brand-colour extraction, and image tagging. Distinct from a single-colour converter or an image resize/info service. No upstream key.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/palette-api","description":"oanor gateway"}],"tags":[{"name":"Palette"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/palette":{"get":{"operationId":"get_v1_palette","tags":["Palette"],"summary":"Extract color palette from an image","description":"","parameters":[{"name":"image","in":"query","required":true,"description":"Base64 image (data-URI or raw) — or use url","schema":{"type":"string"},"example":"iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAKUlEQVR4AYXBsREAMAwCsYfL/iuTFldICoSicJjBDGZ4IrQgmhnMYIYP/XMFEBL0pMsAAAAASUVORK5CYII="},{"name":"url","in":"query","required":false,"description":"Image URL to fetch instead of base64","schema":{"type":"string"}},{"name":"count","in":"query","required":false,"description":"Number of colours (1-16, default 6)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":4,"width":8,"height":8,"average":{"hex":"#808040","rgb":{"b":64,"g":128,"r":128}},"palette":[{"hex":"#ff0000","rgb":{"b":0,"g":0,"r":255},"percentage":25},{"hex":"#00ff00","rgb":{"b":0,"g":255,"r":0},"percentage":25},{"hex":"#0000ff","rgb":{"b":255,"g":0,"r":0},"percentage":25},{"hex":"#ffff00","rgb":{"b":0,"g":255,"r":255},"percentage":25}],"dominant":{"hex":"#ff0000","rgb":{"b":0,"g":0,"r":255},"percentage":25},"pixels_sampled":64},"meta":{"timestamp":"2026-06-02T16:52:03.271Z","request_id":"cc88a429-3718-4982-ba6e-aefc292478d9"},"status":"ok","message":"Extract color palette from image","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"auth":"none upstream; this gateway requires x-api-key","name":"Color Palette API","note":"Extract the dominant colour palette from an image. Pass ?url= an image URL or ?image= a base64 image, with optional ?count=6 (1-16). Returns the palette (hex, RGB, coverage %), the dominant colour and the average colour. Supports PNG, JPEG, BMP, TIFF, GIF. Distinct from color-api (single-colour conversion). Live, nothing stored.","source":"Local extraction (Jimp quantization) — no third-party service, no key","endpoints":2},"meta":{"timestamp":"2026-06-02T16:52:03.387Z","request_id":"3683ee35-40ee-46f7-b039-f53bdeb52ffa"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":1650,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":880,"monthly_call_quota":35000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2820,"monthly_call_quota":198000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6420,"monthly_call_quota":1000000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/palette-api"}