Design
Extract a beautiful color palette from any image
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/image-color-palette' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/image-color-palette' \
-F 'imageFile=/path/to/file.ext' \
-F 'colorCount=6' \
-F 'algorithm=kmeans' \
-F 'sortMode=percentage' \
-F 'sampleSize=10000' \
-F 'ignoreWhite=true' \
-F 'ignoreBlack=true'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/image-color-palette| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | Upload an image to extract its color palette |
| colorCount | number | No | Number of colors in the palette (3-15) |
| algorithm | select | No | Algorithm used for color extraction |
| sortMode | select | No | How to sort the colors in the palette |
| sampleSize | number |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-image-color-palette": {
"name": "image-color-palette",
"description": "Extract a beautiful color palette from any image",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-color-palette",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-color-palette",
"arguments": {
"imageFile": "https://example.com/file.ext",
"colorCount": 6,
"algorithm": "kmeans",
"sortMode": "percentage",
"sampleSize": 10000,
"ignoreWhite": true,
"ignoreBlack": true
}
}
}| Number of pixels to sample from the image |
| ignoreWhite | checkbox | No | Exclude white and near-white colors |
| ignoreBlack | checkbox | No | Exclude black and near-black colors |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]