Skip to main content
All articlesIMAGESHOW-TO26 October 20265 min read

How to Invert the Colors of an Image

Invert any picture to create a negative effect. Free, instant, and nothing to install.

A colorful photo shown next to its inverted negative version

It looks like a party trick until you need it. A scanned whiteboard sketch has to go onto a dark slide. A black logo needs a white version for the footer. Or you’ve found an old film strip and you’d like to know what’s on it. Inverting the colors handles all of those in a couple of clicks, once you know where the button is.

TRY THE TOOLInvert ImageInvert the colors of your images.

What inversion actually does

Every pixel in a normal image stores three numbers for red, green and blue, each between 0 and 255. Inverting replaces each number with 255 minus itself. White (255, 255, 255) turns into black (0, 0, 0). Pure red turns into cyan. A mid-gray hardly moves, which is why gray areas look about the same before and after.

That’s the whole effect. Everything below is about getting a tool to do it without wrecking the file.

Quick fixes in the browser

For a single image, an online inverter is the fastest route. Search for “invert image colors online”, upload the file, press the button, and download the result. It takes less time than reading this paragraph.

Two cautions. Free versions often cap the file size, and your picture goes to someone else’s server, so skip this for anything private. The AllTools4U Invert Image tool runs in your browser instead, so nothing is uploaded.

Photopea is a better choice when you want to stay in control. It’s a free editor that opens in a browser tab and looks a lot like Photoshop. Open the image, go to Image, then Adjustments, then Invert, or press Ctrl+I. Export as PNG from the File menu. The free version shows ads, and that’s the only real cost.

In a desktop editor

Photoshop puts it under Image, Adjustments, Invert, and the shortcut is Ctrl+I (Cmd+I on a Mac). That edit changes the pixels for good. If you’d rather keep the original untouched, add an Invert adjustment layer instead and hide it with the eye icon when you want the old look back.

GIMP is free and has the command under Colors, then Invert. Right beside it sits Value Invert, which flips only the brightness and leaves the hues where they were. On photos it often looks less alien than a full invert, so it’s worth trying both.

Some versions of Microsoft Paint can do it too: select the whole image, right-click, and look for Invert color. I wouldn’t count on it in newer builds, so check yours before you plan around it.

On your phone

Phone gallery editors rarely have an invert button, so the usual trick goes through accessibility settings. Turn on color inversion, open the picture, and take a screenshot.

On an iPhone, the setting is under Accessibility, then Display & Text Size, and you want Classic Invert. Smart Invert is a different option and deliberately leaves photos alone, so it won’t give you what you’re after. Android phones have a color inversion switch somewhere in Accessibility, and where it lives depends on the brand.

The screenshot is only as sharp as your screen, and you’ll need to crop away the status bar. For a quick look that’s fine. For a file you’ll publish, use a proper editor on a computer.

If you work with code

Web developers can do it without touching the file. This CSS flips the image on the page while the original stays as it is:

img { filter: invert(1); }

It’s handy for dark-mode versions of diagrams and logos.

ImageMagick will do one file or a hundred. For a single image:

magick input.png -negate output.png

And in Python, Pillow has a function for it, with one trap. It only accepts RGB images, so convert first if your file has transparency or a different mode:

from PIL import Image, ImageOps
img = Image.open("photo.jpg").convert("RGB")
ImageOps.invert(img).save("photo_inverted.png")

Converting drops any transparency, so if you need to keep it, invert the color channels and put the alpha channel back afterward.

Film negatives need extra steps

A black-and-white negative usually looks right after a single invert. Colour negatives are trickier because film carries an orange tint, and flipping it gives you a blue-heavy picture. You’ll have to correct each color channel separately afterwards, using Levels or Curves. If you have a lot of film to scan, dedicated negative-conversion software takes much less effort.

What to check before you save

  • Save as PNG if you might want to change anything later. JPEG recompresses every time you save, so inverting twice won’t give you back the exact original.
  • Transparent backgrounds stay transparent, but a black logo turns white and can disappear on a white page. Test it on the background you’ll really use.
  • Faces and skin look unsettling when inverted, which is normal. Text, diagrams and line art come out best.
  • If part of the image didn’t flip, a selection was probably active. Deselect and run it again.
  • If the colors feel too harsh, try Value Invert in GIMP, or lower the saturation after you invert.
  • If the image looks almost unchanged, it was probably mostly mid-gray, and those tones stay put.
TRY THE TOOLInvert ImageInvert the colors of your images.
FAQ

Common questions

Short answers to what people ask most about this topic.

Still stuck?

Send us the details and we will take a look.

Get in touch

Open the image in an editor and use its invert command. In Photopea or Photoshop it is Image, Adjustments, Invert, or Ctrl+I. In GIMP it is Colors, then Invert. The AllTools4U Invert Image tool does the same in your browser without uploading the file.