Image Color Replacer
Swap a color in a JPEG or PNG, adjust matching tolerance and export a full-size transparent PNG. Everything runs in your browser.
This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.
Image Color Replacer swaps a chosen color across a JPEG or still PNG and saves a full-size PNG with the original decoded alpha.
How to use it
- 1Choose one local JPEG or still PNG.
- 2Sample or enter a color to replace and set the new color.
- 3Apply the replacement and download the PNG.
Example
- Input
- A 3 × 1 image with red, red and blue pixels. Replace #FF0000 with #00FF00 at 0% tolerance.
- Output
- The two red pixels become green. The blue pixel stays blue.
The PNG keeps the source dimensions and decoded opacity.
What happens to your data
The image is decoded, recolored and encoded in your browser. The file, filename, sampled colors and export are not sent to a processing server.
Last updated November 2026
Change one color across a graphic without editing every occurrence separately. Choose a local JPEG or PNG, then accept the initial sampled color or pick a different one from the original preview. Enter the replacement color, adjust tolerance if needed and download a PNG.
Color replacement is useful for diagrams, flat illustrations and mockups where a chosen shade appears in several places. The preview and changed-pixel count let you check how broadly the replacement applied.
How it works
The first visible decoded pixel sets the initial color to replace. You can pick another visible pixel from the original preview, enter its source X and Y coordinates, or type a six-digit hex color. Coordinates start at zero from the upper-left corner. Replacements operate on all matching pixels, including disconnected regions.
The tool compares the absolute difference in each decoded sRGB channel with the selected tolerance. A pixel matches if the largest channel difference is at most tolerance × 255 ÷ 100. Exact mode uses 0%. Higher tolerance includes more shades, which can recolor unrelated regions too. Matched pixels get the replacement RGB and retain their decoded alpha. Completely transparent pixels are ignored. The matched count includes pixels already using the replacement color, while the changed count records actual RGB edits.
The full-size PNG keeps the decoded dimensions and transparency. Source metadata, original compression and embedded color profiles are omitted. Supports one still JPEG or PNG through 8-bit, up to 20 MiB, 16 million decoded pixels and 8,192 pixels per side. Animated and unsupported formats are refused. File reads, color replacement and export run in the browser.
Worked example: Recolor two equal pixels
- Input
- A 3 × 1 image with red, red and blue pixels. Replace #FF0000 with #00FF00 at 0% tolerance.
- Result
- The two red pixels become green. The blue pixel stays blue.
The PNG keeps the source dimensions and decoded opacity.
Common use cases
- Update a repeated flat color in a diagram
- Try a new brand swatch on a PNG mockup
- Recolor an illustration while keeping its transparent edges
- Check the effect of exact matching before widening tolerance
Frequently asked questions
How do I choose the color to replace?+
Click a visible part of the original preview, use the zero-based pixel coordinate fields, or type a six-digit hex value such as #FF0000.
Why does a JPEG need tolerance?+
Compression can give a flat-looking region several nearby RGB colors. Widening tolerance can include those pixels. Check the preview to see whether unrelated colors also matched.
Does recoloring change the image opacity?+
The decoded alpha values are retained, including partially transparent pixels. Fully transparent pixels do not count as matches.
Does it recolor only the clicked area?+
The sampled point chooses an RGB color. Every visible matching pixel can be replaced, even if it is far from the sampled point. The tool does not recognize objects or preserve photographic lighting.
Standards and limitations
Related tools
Make Color Transparent
Remove white or a picked color from images, preserving other alpha values in a PNG.
Image Palette Extractor
Extract representative colors from a local photo and download a reusable CSS, JSON or SVG palette.
Image Threshold
Convert an image to two-tone black and white, with a threshold and explicit alpha controls.
Image Dither
Turn an image into a black-and-white dot pattern with Floyd–Steinberg or Bayer dithering. Compare the preview and save a full-size PNG locally.