← Back to Blog

What Is Color Inversion and How Does It Work?

Published March 14, 2026 · 6 min

You've seen the effect before — a photo where the sky turns orange, the leaves go blue, and faces look like they belong in a science fiction film. That's color inversion. It's one of the most visually striking image effects you can apply, and the math behind it is surprisingly simple.

This guide explains what color inversion is, how it works, and what you can actually do with it.

What Is Color Inversion?

Color inversion is the process of replacing every color in an image with its mathematical opposite. Each pixel in a digital image is defined by three color channels — red, green, and blue (RGB). When you apply color inversion, the value of each channel gets flipped: the new value is 255 minus the original value.

That's it. One formula applied to every pixel, three times per pixel.

The Color Inversion Formula

255 − R
Red channel
255 − G
Green channel
255 − B
Blue channel
Example: a pixel with RGB (200, 80, 40) becomes (55, 175, 215)

Because the formula is fixed and applies uniformly to every pixel, color inversion is completely predictable — you can calculate exactly what any color will become after inversion before you even run the effect.

What Color Inversion Looks Like

The most intuitive way to understand color inversion is to see what happens to specific colors. Every color inverts to its complementary color — the color directly opposite it on the color wheel.

Color Inversion Pairs

Black
→ White

White
→ Black

Red
→ Cyan

Blue
→ Yellow

Green
→ Magenta

Orange
→ Blue

One result worth knowing: human skin tones, which cluster around warm orange and pink values, invert to a blue-green (cyan) color. This is why inverted portraits look so striking — and why portrait color inversion is almost always an artistic choice rather than a practical one.

Before and After: What Color Inversion Does to Text

Color inversion is especially useful for documents and reading material. A white-background document with black text — the default for almost every PDF and word processor — inverts to a dark background with light text.

Before — Original

Research Paper Title

This document uses a standard white background with dark text. Most PDFs look like this by default, regardless of your system's dark mode setting.

After — Color Inversion

Research Paper Title

The same document after color inversion. The background is now dark and the text is light — easier to read in low-light conditions and more consistent with a dark mode environment.

This is the practical side of color inversion — and it's why tools that apply color inversion to PDFs have become useful for anyone who reads documents on screen regularly.

What You Can Apply Color Inversion To

Color inversion works on any visual content made up of pixels. Here's what's possible:

Images — apply color inversion to any photo, illustration, screenshot, or graphic. The image color inverter on this site handles JPG, PNG, WebP, and HEIC files. Full-image color inversion takes seconds and produces a downloadable result immediately.

Specific areas of an image — rather than inverting an entire image, you can select a region and apply color inversion only there. The partial color inverter lets you draw rectangle, circle, or ellipse selections and invert just those areas, leaving the rest of the image unchanged.

PDF documents — PDFs don't respond to system dark mode settings because they store colors as fixed values. Applying color inversion to a PDF converts it to a dark-background document you can read, save, and share. The Invert PDF Colors tool offers five color themes and processes everything locally in your browser.

Video — color inversion applied frame by frame across a video produces a moving negative-film effect. The Invert Video Color tool handles this in the browser using WebAssembly, outputting an MP4 regardless of the input format.

Color Inversion vs. Grayscale vs. Dark Mode

These three terms are sometimes confused, but they describe different things.

Term What it does Result
Color inversion Flips each RGB channel to 255 minus its current value Every color becomes its complement — colors are preserved but reversed
Grayscale Removes all color information, converts to luminance-based gray tones All color disappears — only light and dark remain
Dark mode Switches an app or website's interface theme to dark colors Interface elements change — but fixed content like PDFs is unaffected

Color inversion changes what every color is. Grayscale removes color entirely. Dark mode changes the interface around the content, not the content itself. You can combine them — for example, converting an image to grayscale and then applying color inversion produces a light-on-dark black-and-white image — but they are separate operations with different results.

Try Color Inversion on Your Files

The tools on this site apply color inversion to images, PDFs, and video directly in your browser — nothing is uploaded to a server, and no account is needed.