LivreImage
PT

Invert the colors of an image

Replaces every pixel with its opposite and saves a PNG: the first step for scanned negatives, a quick way to put a light diagram on a dark slide.

Choose your images Tap or click to choose — or drag them here. On desktop you can also paste with Ctrl+V.
  • Nothing uploaded
  • Free, no sign-up
  • Strips EXIF
  • Batch files

You photographed a strip of 35 mm negatives on a light table and every frame is backward: skies are dark, faces are a muddy cyan-brown, and nothing reads. Or a colleague sent a flowchart drawn for a white slide and it has to sit on a black one before the meeting starts. Both are the same piece of arithmetic: every color has to become its opposite.

That is all this page does. For each pixel, the red, green and blue values are replaced with 255 minus the original, so pure white (255, 255, 255) becomes pure black and a sky blue of (135, 206, 235) becomes a rusty orange of (120, 49, 20). The alpha channel is never touched, which is why the output is preset to PNG: a transparent logo comes back transparent, just recolored.

The decode, the pixel loop and the encode all run on a canvas inside your tab. No file is sent anywhere, there is no queue, and a folder of scans is processed one after another on your own device, limited only by its memory.

How it works

Inversion is already switched on for this page. The one decision left is whether the output should stay PNG.

  1. Drop in the images

    Drag files onto the page, click Choose images, or paste a screenshot with Ctrl+V on desktop. JPG, PNG, WebP, iPhone HEIC, GIF (first frame only), BMP and SVG are accepted, and you can queue as many as your device can hold.

  2. Keep PNG, or pick another format

    In the settings panel, Output format is preset to PNG because it is lossless and keeps transparency. Switch to JPG only for flat photos with no transparent areas, or to WebP for a smaller file that still keeps the alpha channel. Max width (px) shrinks the pixels if needed; the Quality slider affects JPG, WebP, AVIF and PDF. There is no strength control: every pixel is fully inverted.

  3. Generate, compare, download

    Click Generate images. Each result card shows the inverted preview with its dimensions and file size, and Compare slides the original over it. Save cards one at a time or take the whole batch with Download all (.zip). EXIF data is dropped from every output.

What happens to each channel, pixel by pixel

Every pixel's red, green and blue value (0 to 255) is replaced with 255 minus that value. No curve, no gamma, no auto-adjustment: the same input always gives the same output. Near-gray tones barely move; saturated colors jump to their complement. Alpha is skipped, so a soft-edged PNG cutout keeps its soft edges.

This is the classic invert of iOS Classic Invert or the Windows Inverted color filter, not the smart version that leaves photos alone. Reference points:

OriginalRGB inAfter inversionRGB out
White255, 255, 255Black0, 0, 0
Red255, 0, 0Cyan0, 255, 255
Green0, 255, 0Magenta255, 0, 255
Blue0, 0, 255Yellow255, 255, 0
Light skin tone224, 172, 105Steel blue31, 83, 150
Mid gray128, 128, 128Mid gray127, 127, 127

Film negatives: black-and-white inverts clean, color comes out blue

A black-and-white negative has a clear base, so one pass here gives a usable positive; a gray or sepia scanner cast usually disappears after a trip through the black-and-white page. Color negative film has an orange base mask, and 255 minus orange is a deep blue laid over the whole frame.

Film scanners and negative-conversion plugins cancel the mask by balancing each channel against the unexposed film border. This page treats all three channels alike, so use it as the sorting step: invert the roll, pick the keepers, then neutralize the base with per-channel curves in an editor. Photographing negatives with a camera? Set a custom white balance on a blank patch of orange base first; the inverted result lands far closer to neutral.

Dark-mode diagrams and light-on-dark reading

A flowchart, wiring diagram, code screenshot or scanned page with black lines on white becomes white on black, ready for a dark slide or a dark-theme README. The reverse is just as useful: a terminal screenshot inverted to black-on-white prints with a fraction of the toner, and a page image flipped to light-on-dark suits readers with light sensitivity who use inverted colors.

Anything that carries meaning in its color does not survive: a red warning arrow turns cyan, a green status dot turns magenta, a logo picks up its complementary palette. Front-end developers dodge that with CSS invert(1) plus a 180° hue rotation; this page applies the plain invert only, so export photos and color charts separately.

Why a transparent logo can come back with a black background

The pipeline fills the canvas with white before drawing whenever the output is JPG, BMP or PDF, because those formats have no alpha channel. The inversion runs after that draw, so the white fill becomes solid black. Leave the format on PNG or WebP and transparent pixels stay transparent; only their color values change.

Two passes through PNG restore the original exactly, since 255 minus (255 minus v) is v. Sides over 10,000 px are scaled down to that limit first.

Frequently asked questions

Is inverting twice lossless?

With PNG in and out, yes: the second pass returns every pixel to its exact original value. Through JPG, each save re-encodes the image, so the round trip looks identical but is not byte-for-byte identical.

Why does my inverted color negative look blue?

Color negative film has an orange base mask, and inverting orange gives blue. This page inverts all three channels equally; removing the cast takes per-channel curves in an editor, or a custom white balance set on the film base when you photograph the strip.

Can I invert the background but keep the original colors?

No. Every channel of every pixel is inverted, so red becomes cyan and blue becomes yellow. A hue-preserving invert (invert plus a 180° hue rotation) needs a CSS filter or an image editor.

Why did the transparent background turn black?

The output was set to JPG, which has no alpha channel. The canvas is filled with white before drawing, and the inversion then turns that white into black. Generate again with PNG selected and the transparency survives.

Can I get a black-and-white negative in one pass?

No; each page applies one filter. Run the image through the black-and-white page first with PNG output, download it, then drop that file here.

Does this work on a dark-mode screenshot I want to print?

Yes. Paste the screenshot with Ctrl+V and the result is dark text on a light background. Any photo, icon or colored chart in the screenshot is inverted too, so check those before printing.

Is this the same as Smart Invert on an iPhone?

No. Smart Invert skips photos and app icons; this tool is the classic invert applied to the file itself, so everything in the image is inverted. It is a quick way to hand a light-on-dark version of a document image to someone who reads better that way.

Are my family film scans uploaded to a server?

No. The image is decoded, inverted pixel by pixel and re-encoded on a canvas in your browser tab. The only download is a decoder of about 1 MB, fetched once if you open an HEIC file.

Advertisement