Image color replace
Try it interactively →POST /api/image-color-replaceRecolor regions of an image: replace one colour (within a tolerance) with another. Useful for theme-swapping logos, recoloring icons, etc.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| image* | file | — | Input image (PNG / JPEG / WebP). |
| from* | string | — | Source colour name or #rrggbb. |
| to* | string | — | Replacement colour name or #rrggbb. Use `transparent` to erase the background. |
| fuzz | number (0…100) | 0 | Tolerance percentage around `from`. |
| format | enum (png | jpeg | webp) | — | Output format (defaults to input). PNG/WebP preserve transparency; JPEG flattens it. |
Response
Modes: binary, base64-json. Cache: yes (24h TTL).