ToolNimba Browse

🌗 Invert Image Colors (Negative)

By ToolNimba Editorial Team · Updated 2026-06-19

PNG, JPG, WEBP, GIF or BMP. Nothing is uploaded, the file stays on your device.

Applies to JPEG and WEBP only.

Download result

Choose an image to get started.

This tool inverts the colors of any image to create a photo negative, the same effect as old film negatives where light areas turn dark and every color flips to its opposite. Upload a picture, click invert, and the whole image is processed right here in your browser. Nothing is uploaded to a server. Preview the result side by side with the original, then download it as a PNG, JPEG or WEBP.

What is the Invert Image Colors?

Inverting colors means replacing every color value with its complement. A digital image stores each pixel as three numbers from 0 to 255: red, green and blue (RGB). To invert a pixel, you subtract each value from 255, so a channel reading 0 becomes 255 and a channel reading 200 becomes 55. Do that for every pixel and you get the negative: white becomes black, black becomes white, red becomes cyan, blue becomes yellow, and green becomes magenta. The transparency (alpha) channel is left alone, so transparent areas stay transparent.

Under the hood the tool draws your image onto an HTML canvas, reads the raw pixels with getImageData, runs the 255 minus value calculation across the red, green and blue channels, and writes the result back with putImageData. Because canvas works pixel by pixel, the effect is exact and lossless on the math: applying it twice returns the original image. The only quality loss comes from the file format you save in, so PNG keeps the result pixel perfect while JPEG and WEBP add their own compression at the quality you choose.

A color negative is not the same as a grayscale or black and white photo. Grayscale removes color entirely and keeps the brightness, while inversion keeps full color but swaps each hue for its opposite and flips dark and light. If you only want the brightness flipped while keeping the original hues, that is a different operation. This tool performs a true RGB inversion, which is what people usually mean by a negative or inverted image.

When to use it

  • Turning a normal photo into a film style negative for an artistic or retro look.
  • Recovering a readable image from a scanned film negative by inverting it back to a positive.
  • Creating a dark mode version of a chart, diagram or screenshot that has a plain white background.
  • Checking a logo or graphic against the opposite color scheme before choosing final colors.
  • Producing high contrast or accessibility test variants of an image to inspect detail.

How to use the Invert Image Colors

  1. Click Choose an image and select a PNG, JPG, WEBP, GIF or BMP file from your device.
  2. Wait for the preview to load and confirm the dimensions look right.
  3. Pick the download format (PNG keeps transparency) and set the quality for JPEG or WEBP.
  4. Click Invert colors to flip every pixel to its opposite.
  5. Compare the original and inverted previews, then click Download result to save the negative.

Formula & method

For every pixel, new channel = 255 - old channel, applied to red, green and blue. The alpha (transparency) channel is unchanged. So a pixel (R, G, B) becomes (255 - R, 255 - G, 255 - B).

Worked examples

You want to invert a single white pixel with RGB (255, 255, 255).

  1. Red: 255 - 255 = 0
  2. Green: 255 - 255 = 0
  3. Blue: 255 - 255 = 0
  4. Result pixel = (0, 0, 0), which is pure black

Result: White (255, 255, 255) inverts to black (0, 0, 0).

You invert a pure red pixel with RGB (255, 0, 0).

  1. Red: 255 - 255 = 0
  2. Green: 255 - 0 = 255
  3. Blue: 255 - 0 = 255
  4. Result pixel = (0, 255, 255), which is cyan

Result: Red (255, 0, 0) inverts to cyan (0, 255, 255), its opposite color.

You invert a mid gray pixel with RGB (120, 120, 120).

  1. Red: 255 - 120 = 135
  2. Green: 255 - 120 = 135
  3. Blue: 255 - 120 = 135
  4. Result pixel = (135, 135, 135), a slightly lighter gray

Result: Gray (120, 120, 120) inverts to (135, 135, 135). Mid gray stays close to itself.

Common colors and what they become after inversion

Original colorOriginal RGBInverted RGBInverted color
White255, 255, 2550, 0, 0Black
Black0, 0, 0255, 255, 255White
Red255, 0, 00, 255, 255Cyan
Green0, 255, 0255, 0, 255Magenta
Blue0, 0, 255255, 255, 0Yellow
Mid gray128, 128, 128127, 127, 127Mid gray

Common mistakes to avoid

  • Expecting a grayscale result. Inversion is not the same as black and white. It keeps full color and swaps every hue for its opposite. If the image still looks colorful after inverting, that is correct. Use a grayscale tool if you want color removed.
  • Saving a transparent image as JPEG. JPEG cannot store transparency, so any transparent areas are filled with a solid background (white here) before saving. Choose PNG or WEBP if you need to keep transparent regions in the negative.
  • Assuming the colors are damaged. Inversion is fully reversible math. Running the tool on an already inverted image returns the original. The only quality change comes from lossy formats like JPEG, not from the inversion itself.
  • Trying to invert a protected or cross origin image. If you load an image the browser marks as cross origin and tainted, the canvas cannot read its pixels. Download the picture to your device first, then upload that saved copy to invert it.

Glossary

Invert (negative)
Replacing every color value with 255 minus that value, so light and dark swap and each color becomes its opposite.
RGB
The red, green and blue channels that make up each pixel, each stored as a number from 0 to 255.
Alpha channel
The transparency value of a pixel. Inversion leaves it untouched so see through areas stay see through.
Canvas
A browser drawing surface that lets JavaScript read and write the raw pixels of an image directly.
Grayscale
An image that has had color removed, leaving only shades of gray. This is different from an inverted color image.

Frequently asked questions

How do I invert the colors of an image?

Upload your image above, choose a download format, then click Invert colors. The tool subtracts each red, green and blue value from 255 to make a photo negative, shows a preview, and lets you download the result.

Is my image uploaded to a server?

No. The whole process runs in your browser using an HTML canvas. Your file never leaves your device, which keeps it private and means the tool works even on a slow connection.

What is the difference between inverting colors and grayscale?

Inverting keeps full color but swaps every hue for its opposite and flips dark and light, like a film negative. Grayscale instead removes color and leaves only shades of gray. They are two separate effects.

Will inverting twice damage my image?

No. Inversion is exact, reversible math, so inverting an already inverted image returns the original pixels. The only quality loss can come from saving in a lossy format such as JPEG at a low quality setting.

Can I invert a scanned film negative back to a normal photo?

Yes, inverting a color negative gives you a positive image. Note that real film negatives also carry an orange color mask, so the result may need extra color correction to look fully natural.

Which file formats can I use and download?

You can upload PNG, JPG, WEBP, GIF or BMP. For download you can choose PNG (which keeps transparency), JPEG, or WEBP. JPEG and WEBP let you pick a quality level to trade file size against detail.