Design
Extract a dominant color palette from an image (k-means clustering), then export it as CSS variables, SCSS variables, a Tailwind config, or JSON design tokens — with named colors and an auto-generated shade scale for each
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-to-design-tokens' \
-F 'file=@/path/to/image.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/image-to-design-tokens' \
-F 'image=/path/to/file.ext' \
-F 'paletteSize=5' \
-F 'scale=tailwind' \
-F 'format=css' \
-F 'prefix=brand' \
-F 'naming=semantic'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-to-design-tokens| Name | Type | Required | Description |
|---|---|---|---|
| image | fileupload required | Yes | — |
| paletteSize | select | No | — |
| scale | select | No | — |
| format | select | No | — |
| prefix | text | No | — |
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-to-design-tokens": {
"name": "image-to-design-tokens",
"description": "Extract a dominant color palette from an image (k-means clustering), then export it as CSS variables, SCSS variables, a Tailwind config, or JSON design tokens — with named colors and an auto-generated shade scale for each",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-to-design-tokens",
"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-to-design-tokens",
"arguments": {
"image": "https://example.com/file.ext",
"paletteSize": "5",
"scale": "tailwind",
"format": "css",
"prefix": "brand",
"naming": "semantic"
}
}
}| naming | select | No | — |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Questions or issues? Contact [email protected]