To invert image colors means to replace every colour with its opposite, so white becomes black, blue becomes yellow and light areas turn dark. The result looks like a photographic negative. Designers use it to check contrast, to make dark-mode versions of black-on-white graphics and to create striking effects. This tool inverts a JPG, PNG or WebP picture in your browser and saves the result.
How to invert image colors
- Choose a picture or drop it on the box.
- The inverted picture appears in the preview straight away.
- Press Save inverted picture to download it.
- Press Start again to invert something else.
What inverting does
- Each pixel has a red, a green and a blue value from 0 to 255. The tool replaces each value v with 255 minus v.
- White (255, 255, 255) becomes black (0, 0, 0), and the reverse.
- Mid grey (128) becomes almost the same grey (127).
- The alpha channel, which holds transparency, is not changed, so see-through areas stay see-through.
How it is done in the browser
The picture is drawn on a canvas and its pixels are read with getImageData, which returns the data as a Uint8ClampedArray with 8 bits for each of the red, green, blue and alpha components [1]. The tool then flips the colour values and writes them back. The CSS invert filter works the same way: a value of 100 percent applies a complete inversion of the colour samples [2]. The result is saved with toBlob [3]. A PNG stays PNG and a JPG stays JPG.
Worked example
An orange pixel with red 255, green 128 and blue 0 becomes red 0, green 127 and blue 255, a bright blue. A white page with black text becomes a black page with white text. Inverting twice returns the exact original values, because 255 minus (255 minus v) equals v, so you never lose information by inverting and inverting back.
| Original | Inverted |
|---|---|
| White 255, 255, 255 | Black 0, 0, 0 |
| Orange 255, 128, 0 | Blue 0, 127, 255 |
| Red 255, 0, 0 | Cyan 0, 255, 255 |
| Grey 100, 100, 100 | Grey 155, 155, 155 |
Uses for inverted pictures
- Make a light version of a dark logo, or a dark version of a light one.
- Read old film negatives that you have scanned as positives.
- Check whether a design still works when its contrast is reversed.
- Create a bold, artistic effect for posters and social posts.
Things to know
- Inverting a colour photograph gives odd colours: skin looks blue and skies look orange. That is normal.
- A scanned colour film negative also has an orange tint that plain inversion does not remove, so the result may still need colour correction.
- JPG is lossy, so saving an inverted JPG applies compression once more.
Why invert a picture
Inversion makes dark areas light and light areas dark. Black text on a white scan becomes white text on black, which can be easier on the eyes at night. Line art and icons can be turned from dark to light so they show on a dark background. Photographers invert scanned negatives as a first step in recovering a positive, and artists invert pictures simply for the unusual look.
Inversion and transparency
Pictures with transparent backgrounds, such as PNG logos, keep their transparency. Only the visible colours are inverted, so a black logo on a clear background becomes a white logo on a clear background. This is handy for making a light logo for use on dark pages. Check the result on a dark background, because a white logo on a white page seems to disappear.
Quality and file types
A PNG is saved as a PNG with no loss at all. A JPG or WebP photo is saved as a JPG, which compresses again, so keep the original if quality matters. The picture keeps its original pixel size, so you can use the inverted copy anywhere the original fits. Very large pictures are processed in one pass, which can take a moment on a phone.
Practical advice
Before you invert, decide whether you need the whole picture inverted. This tool inverts everything, so if you only want to invert a logo or a scanned page, crop the picture first. For black-and-white scans of documents, inversion is a quick way to make a dark-mode copy for reading at night. For colour photographs, results are best treated as an artistic effect. Compare the original and inverted versions side by side to choose the one that suits your purpose.
Because the operation is exact and reversible, you can invert, edit the inverted copy in another program, and invert it back, which is a common trick for adjusting dark details in an image. Keep the output as PNG for the best fidelity during such multi-step work.
Privacy and file limits
Everything happens inside your browser tab. The picture is read from your device, drawn on a canvas and saved back to your device, so nothing is sent to a server and nobody else sees it. Files up to 50 MB are accepted, and very large pictures are refused when they would be too big for your browser to handle. JPG, PNG and WebP are supported.
What next
Use this often? Add Invert Image to your Home screen.
Frequently asked questions
How do I invert image colors?
Choose a picture. The tool flips the red, green and blue value of every pixel and shows the result, which you can then save.
Does inverting change transparency?
No. Only the colour values change. Transparent areas of a PNG stay transparent.
Can I get the original back?
Yes. Inverting an inverted picture returns the original values, apart from the extra compression if you save as JPG.
Will this turn a film negative into a normal photo?
It flips the tones, but a colour film negative has an orange tint that inversion alone does not remove, so you may need to adjust colours afterwards.
Is my picture uploaded?
No. The colours are flipped in your browser and the picture never leaves your device.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.