xtract.bot

Image color replace

Try it interactively →
POST /api/image-color-replace

Recolor regions of an image: replace one colour (within a tolerance) with another. Useful for theme-swapping logos, recoloring icons, etc.

Replaces one colour with another, treating colours within a `tolerance` as the same. Useful for: - Re-tinting flat-colour graphics, logos, icons. - Theme-swapping a single accent colour across an image. - Quick "I want this red apple to be green" edits.

Inputs

NameTypeDefaultDescription
image*fileInput image (PNG / JPEG / WebP).
from*stringSource colour name or #rrggbb.
to*stringReplacement colour name or #rrggbb. Use `transparent` to erase the background.
fuzznumber (0…100)0Tolerance percentage around `from`.
formatenum (png | jpeg | webp)Output format (defaults to input). PNG/WebP preserve transparency; JPEG flattens it.

Response

Modes: binary, base64-json. Cache: yes (24h TTL).