color_background
Replaces an image background with a solid hex or RGB(A) color and saves the edited result to a local file.
Instructions
Replace the background with a solid color.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image_path": "<image_path>",
"color": "<color>"
},
"name": "color_background"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes | Color as hex ('#FF8C00', '#FF8C0080') or RGB(A) ('255, 140, 0' or '255, 140, 0, 255'). | |
| image_path | Yes | Path to a local JPG, PNG, WEBP, BMP or GIF image (1 KB to 10 MB). | |
| output_path | No | Where to save the result. Defaults to '<name>_<operation>.<ext>' next to the input image. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |