Invert image colors

Drop an image and every color is flipped to its opposite (white becomes black, blue becomes yellow). Download the result.

Private by design: your image is opened, edited and saved by your own browser with the Canvas API. It is never uploaded to a server, and the page keeps working offline once loaded.

How inversion works

R′ = 255 − R, G′ = 255 − G, B′ = 255 − B

Example: orange rgb(255, 165, 0) becomes rgb(0, 90, 255), a strong blue. Inverting a color film scan gives a rough positive, but the orange film base leaves a blue cast, so adjust saturation afterwards.

How the adjustments are calculated

Each pixel’s red, green and blue values (0–255) are changed by simple formulas. Luminance uses the standard weights:

gray = 0.299·R + 0.587·G + 0.114·B

Sepia applies the common matrix R′ = 0.393R + 0.769G + 0.189B, G′ = 0.349R + 0.686G + 0.168B, B′ = 0.272R + 0.534G + 0.131B. Contrast uses factor = 259(c + 255) ÷ (255(259 − c)). The preview is reduced for speed; the download is processed at full size.

Frequently asked questions

Is inverting reversible?
Yes, inverting twice gives the original colors exactly (apart from JPG compression).