CloudToolbox
Blog

How to Change the Color of a PNG (and Keep the Transparency)

Published October 24, 2026

PNGs are the format of choice for logos, icons, stickers and graphics, mostly because they can have a transparent background. That's also what makes recoloring them tricky. Plenty of quick fixes change the color but wreck the transparency, or leave a thin halo of the old color around every edge. Here's how to change the color of a PNG cleanly, for free, without design software.

The quick way: recolor it in your browser

Our Color Replacer recolors PNGs directly in your browser. The file never leaves your device.

  1. Upload the PNG. The preview shows a checkerboard behind it, so you can see which parts are transparent.
  2. Click the color you want to change on the preview. This picks its exact value. Don't guess with a hex code: a logo that looks pure black is often #1a1a1a or similar, and a guess that's slightly off can miss most of it.
  3. Enter the new color. Paste your hex code (like #e11d48) into the color picker.
  4. Choose the mode. Use Solid color for flat graphics and logos: every matched pixel becomes exactly your hex code. Use Keep shading if the PNG has gradients, shadows or a photo in it, so those survive the change.
  5. Check Before/After, then download. You get a PNG back, the same size as the original, with the same transparency.

Why the transparency survives

Every pixel in a PNG has four values: red, green, blue, and alpha (how opaque it is). Recoloring only changes the first three. Alpha is never touched, so transparent areas stay transparent and semi-transparent areas stay exactly as see-through as before.

That matters most at the edges. A smooth, anti-aliased edge on a logo is a row of pixels that fade from fully opaque to fully transparent. In a transparent PNG those fading pixels are still the logo's own color, just at partial opacity, so they recolor along with the rest and the edge stays smooth. You don't need a high tolerance for this. The default is usually enough.

Why you sometimes get a halo instead

If the graphic sits on a solid background instead of transparency (a white square around the logo, which is common in PNGs exported from slides or screenshots), the edge pixels are a blend of the logo color and the background. Change the logo's color at a low tolerance and those blended pixels keep a faint ring of the old color.

Fix it by raising the tolerance a step at a time until the ring disappears, and stop before the background starts changing too. If you actually want the background gone, use the Background Remover first to make it transparent, then recolor.

Changing the color of a PNG logo

Recoloring a logo to match a new brand palette, or making a white version for a dark website header, is the most common reason to change a PNG's color. A few things to know:

Doing it in Photoshop or GIMP instead

If you already use an image editor, there are two standard approaches. To turn an entire single-color graphic into a new color, lock the layer's transparent pixels and fill it with the new color; in Photoshop, a Color Overlay layer style does the same without changing the original. To shift colors while keeping shading, use Hue/Saturation and adjust the hue slider. Both are more work than a one-click recolor, but they give you full control when an image needs hand-painted masks.

Quick answers

Will the result still be a PNG?

Yes. The output keeps the original format and dimensions. Only the color of the matched pixels changes.

Can I change the color of a PNG to transparent?

That's background removal rather than recoloring. Use the Background Remover, which makes a chosen color transparent instead of swapping it for another one.

Why did parts I didn't want changed also change?

Something else in the image is close to the color you picked. Lower the tolerance, or turn on Only the area I click so only the region connected to your click is recolored.

Can I use the recolored PNG as a favicon or app icon?

Yes. Run the result through our Favicon Generator for website icons, or the Image Crop Tool's Apple App Icon preset for iOS apps.

Try it yourself: Color Replacer →