{"slug":"agent402-tools-api-image-dominant-color-7b93cd","title":"Extract the dominant colors of an image as a palette of hex values with pixel ra","host":"agent402.tools","method":"POST","resource":"https://agent402.tools/api/image-dominant-color","category":"image","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.","price_listed":0.003,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":7,"reported_payers_30d":1,"networks":["algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=","eip155:10","eip155:1329","eip155:137","eip155:143","eip155:42161","eip155:42220","eip155:43114","eip155:4663","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","stellar:pubnet"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"colors":3,"url":"https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/Canon_40D.jpg"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"colors":{"description":"palette size, 1-10 (default 5)","type":"number"},"image":{"description":"alternative: base64 image, optionally a data: URL","type":"string"},"url":{"description":"public http(s) image URL (fetched server-side, 5MB cap)","type":"string"}}},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"colors":{"items":{"properties":{"hex":{"type":"string"},"ratio":{"type":"number"},"rgb":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"type":"array"},"height":{"type":"integer"},"sampled":{"type":"integer"},"width":{"type":"integer"}},"required":["width","height","sampled","colors"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"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.","last_updated":"2026-09-22T11:55:55.71Z","schemes":["exact","upto"]}