Change Png Color
Upload a PNG image and replace a specific color with another. Pick source and target colors, adjust tolerance, preview and download.
Source Color
Tip: Click the preview image to pick a color directly.
Target Color
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
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.
Red logo icon (#FF0000)
Tolerance: 30
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.
Black icons (#000000)
Target: #FFFFFF
Tolerance: 15
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.
Light gray background (#E8E8E8)
Target: #FFFFFF
Tolerance: 20
Pure white background
Product colors untouched
Who Uses This
Recolor UI icons to match a new design system without opening Figma.
Quick-test color variations on exported assets before committing to a palette.
Update campaign graphics to match seasonal brand colors in seconds.
Swap product photo backgrounds to white for marketplace compliance.
Common Mistakes
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.
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.
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
- Processing: 100% client-side — nothing is uploaded
- Browser Support: Chrome, Firefox, Safari, Edge
- Supported Format: PNG (transparency preserved)
- Max File Size: Limited only by your browser’s memory
- Color Matching: Euclidean distance in RGB space with adjustable tolerance
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.