Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Change Png Color

Upload a PNG image and replace a specific color with another. Pick source and target colors, adjust tolerance, preview and download.

Your files never leave your browser
Drop PNG here or click to upload
Supports PNG images (max 50 MB)

Source Color

#ffffff
30

Tip: Click the preview image to pick a color directly.

Target Color

#ff0000

Original

Result

Swap one color in a PNG for another without opening Photoshop. Pick the source color (or click the image to sample it), choose a target color, and tune the tolerance slider to catch anti-aliased edges. And everything runs in your browser. Nothing gets uploaded.

How It Works

Upload PNG
→
Pick Source & Target Colors
→
Download Recolored PNG

The tool reads every pixel through the HTML5 Canvas API. For each one, it calculates the Euclidean distance in RGB space between that pixel and your source color. If the distance falls within the tolerance you set, that pixel gets painted with the target color. Transparency stays untouched — only the RGB channels change on matching pixels.

Examples

Rebranding a Logo Icon

Your company switched from red to teal, and you need the favicon updated before lunch.

INPUT
Red logo icon (#FF0000) Tolerance: 30
OUTPUT
Teal logo icon (#0D9488) All red shades replaced cleanly

Matching Social Media Icons to a Dark Theme

You grabbed a free icon set but the icons are black, and your site has a dark background. White icons would look right.

INPUT
Black icons (#000000) Target: #FFFFFF Tolerance: 15
OUTPUT
White icons with clean edges Transparency preserved

Changing a Product Photo Background

An e-commerce listing has a product shot on a light gray background. Marketing wants pure white for the Amazon listing, and the gray is uniform enough to swap.

INPUT
Light gray background (#E8E8E8) Target: #FFFFFF Tolerance: 20
OUTPUT
Pure white background Product colors untouched

Who Uses This

👨‍💻 Developers

Recolor UI icons to match a new design system without opening Figma.

🎨 Designers

Quick-test color variations on exported assets before committing to a palette.

📢 Marketers

Update campaign graphics to match seasonal brand colors in seconds.

🛒 E-commerce Sellers

Swap product photo backgrounds to white for marketplace compliance.

Common Mistakes

Setting tolerance too high

A tolerance of 80+ can bleed into neighboring colors. If your red-to-blue swap is turning skin tones purple, bring it down to 20–40 and increase gradually.

Using a JPEG instead of PNG

JPEG compression introduces color noise, so a "solid red" area actually contains dozens of slightly-different reds. The tool expects PNG. Convert your file first if you’re starting with JPEG.

Forgetting anti-aliased edges

Icons and text often have semi-transparent edge pixels that blend between the foreground and background. A tolerance of 0 will miss those fringe pixels, leaving a visible halo. Bump it up to 15–25 for smoother results.

Technical Details

Frequently Asked Questions

How do I change the color of a PNG image?

Upload your PNG, click on the color you want to replace (or pick it manually), then choose the new color. Adjust tolerance if the original color has slight variations. Hit download when the preview looks right.

Can I change multiple colors in one PNG?

Not in a single pass. But you can download the result after the first color swap, re-upload it, and swap the next color. Each round takes about five seconds, so doing two or three colors is still faster than opening an editor.

Does this work with transparent PNGs?

Yes. Transparency is fully preserved. The tool only changes the RGB values of pixels that match your source color — the alpha channel stays exactly the same. Fully transparent pixels are skipped entirely.

What tolerance value should I use?

Start around 20–30 for most icons and flat-color images. If the image has gradients or anti-aliased edges, you might need 40–60. A tolerance of 0 only matches the exact hex color, which works for pixel-perfect flat graphics but misses edge blending.

Is my image safe? Do you store it?

Your image never leaves your device. The color replacement runs entirely in your browser using the Canvas API. There is no server involved, no upload, and no storage. Once you close or refresh the page, the image data is gone from memory.

Share: