---
title: "Image Color Replacer - Swap Colors in PNG & JPG"
description: "Replace a color in an image with adjustable tolerance. Sample a pixel, preview the change, and save a transparent PNG. Free and processed in your browser."
url: https://candoya.com/tools/image-color-replacer/
locale: en
type: browser-tool
---

# Image Color Replacer

Category: [Images](https://candoya.com/tools/image/)

## What is an image color replacer?

An image color replacer swaps a chosen color for another across a picture. Add a PNG, JPG, or WebP, sample the source color, and choose its replacement. Adjust tolerance to include nearby shades, compare the original with the result, then download a PNG with the same dimensions and transparency.

Matching uses Euclidean distance in [Oklab color space](https://www.w3.org/TR/css-color-4/#color-difference-OK). The tolerance value is 100 times that distance; zero matches only identical RGB values. Pixels inside the threshold receive the exact replacement RGB color while their alpha channel stays unchanged. Fully transparent pixels are ignored.

Each application starts from the original image, so repeated adjustments do not accumulate damage. This is a flat-color editor: it does not isolate objects or retain shadows, texture, or gradients inside a matched area. No file or pixel data is sent to a processing server.

## How to use it

1. **Choose your image** - Drop a PNG, JPG, or WebP into the editor, or try the sample artwork. Your file is decoded locally.
2. **Choose the two colors** - Click a visible pixel in the original image or enter its HEX code. Set the replacement using its color picker or HEX field.
3. **Adjust and apply** - Start with a low tolerance. Apply replacement, compare both previews, and increase tolerance if nearby shades were missed.
4. **Save the PNG** - Download the current result. Changing a setting disables the download until you apply it, so the saved file matches your preview.

## Who it's for

- Update a brand color in a flat logo without rebuilding the artwork.
- Recolor icons, diagrams, and pixel art while keeping their transparent background.
- Try alternate colors for a slide illustration or social graphic.

## Expert note

A soft logo edge can contain several blended colors even when the interior is uniform. Sample inside the solid area and raise tolerance gradually. A large tolerance may also recolor unrelated objects elsewhere in the picture, because matching is global rather than a connected-area selection.

## Frequently asked questions

### Is my image uploaded to a server?

No. The browser decodes, samples, recolors, and exports your image on your device. The tool does not send the file or its pixels to a processing server.

### Is the image color replacer free?

Yes. Color replacement and PNG downloads are free, with no account, watermark, or usage credits. The same file and dimension limits apply to every image.

### Which image formats and sizes can I use?

Use PNG, JPG, or WebP files up to 25 MB and 12 megapixels. Each side must be at most 8,192 pixels. Output is always a static PNG at the original decoded dimensions. Animated files are reduced to the frame exposed by the browser decoder.

### How does tolerance affect color replacement?

Zero replaces exact RGB matches only. Higher values include colors within a larger Oklab distance from your source color, including differences in lightness. The scale runs from 0 to 100 and is not a percentage of selected pixels. Apply the setting to inspect the matched count.

### Will it preserve a transparent PNG background?

Yes. Replacement keeps each pixel's existing alpha value, including partial transparency. Fully transparent pixels are skipped. The checkerboard is only a preview backdrop and is not added to the downloaded PNG.

### Can I change only one object in a photograph?

Matching applies to the whole image, so every visible pixel within tolerance is replaced, wherever it occurs. The tool works best for flat graphics. It does not identify objects, preserve photographic shading, or provide a brush selection.

### Why does a JPG leave speckles around the changed color?

JPEG compression and anti-aliasing create neighboring colors along edges. An exact match misses those pixels. Increase tolerance in small steps and check both previews. Starting with an original PNG usually gives a cleaner result than a compressed JPEG.

## Related tools

- [Image Color Picker](https://candoya.com/tools/image-color-picker/)
- [Image Color Palette Extractor](https://candoya.com/tools/image-color-palette-extractor/)
- [Image Resizer](https://candoya.com/tools/image-resizer/)
- [Grayscale Converter](https://candoya.com/tools/grayscale-converter/)
- [Image Compressor](https://candoya.com/tools/image-compressor/)

---

*Markdown edition of <https://candoya.com/tools/image-color-replacer/>, published for AI agents and other automated readers. Index of key pages: <https://candoya.com/llms.txt>.*
