palette_extract
ActiveTool of Colour Memory
Extract dominant colours from an image using k-means++ clustering. Accepts a public image URL or base64-encoded image. Returns hex values with proportional weights sorted by luminance. Optionally runs palette_analyse on the results. Use this instead of image_palette when you need hex values with proportions for palette_analyse or palette_swatch.
Parameters schema
{
"type": "object",
"required": [],
"properties": {
"k": {
"type": "integer",
"description": "Number of colours to extract (3-12, default 6)"
},
"analyse": {
"type": "boolean",
"description": "If true, also run palette_analyse on the extracted colours and return archive names"
},
"archive": {
"type": "string",
"description": "Explicit single archive name to restrict matching to e.g. 'MarsColour', 'Japan', 'Victorian'."
},
"image_id": {
"type": "string",
"description": "Ephemeral image_id from ingest_image (preferred for images over 50 KB)"
},
"image_url": {
"type": "string",
"description": "Public URL of the image to extract colours from"
},
"image_base64": {
"type": "string",
"description": "Base64-encoded image data (small images only, under 50 KB)"
},
"grey_card_hex": {
"type": "string",
"description": "Hex value sampled from a grey or white card in the image for white balance correction e.g. #C8C8C8"
},
"style_context": {
"type": "string",
"description": "Plain English style description that restricts archive matching to a coherent set e.g. 'English cottage garden', 'Victorian', 'Japanese', 'MarsColour', 'Arts and Crafts'. Prevents palette colours from being named across unrelated archives."
}
}
}No endpoints wrapped at confidence ≥ 0.50.
Parent server
Colour Memory
https://github.com/DigbyO/colour-memory-api
2/7 registries