How to invert the colours of an image
The image is drawn to an HTML canvas with the invert filter applied, which replaces each colour channel with 255 minus its value, and the canvas is exported as a PNG. The alpha channel is left alone, so transparency survives.
Because the operation is exact and reversible, this is one of the few image edits where nothing is lost. Run the PNG back through the tool and you get the original pixels.
- Choose the image you want to invert.
- Look at the preview: flat graphics, screenshots, and scanned text will look deliberate; photographs will look like negatives.
- Click Download PNG to save the inverted version.
- If you were trying to convert a film negative, plan on a colour editor afterwards to correct the orange mask.
- To undo, run the exported PNG back through the tool, which restores the original exactly.