Get the exact inverse of any color
This tool computes the precise inverse of a color by subtracting each RGB channel from 255 — the same operation as a photographic negative. It is useful for generating dark-mode counterparts, finding a high-contrast accent, or simply seeing what the “opposite” of a color looks like.
How it works
A color in RGB is three numbers from 0 to 255 for red, green, and blue. The inverse is found channel by channel with a single subtraction: inverse = 255 - value. So rgb(52, 152, 219) becomes rgb(203, 103, 36). White (255,255,255) inverts to black (0,0,0) and vice versa, and a fully saturated red inverts to cyan.
This is the literal numeric inverse, sometimes called the complementary color. Note that it differs from a hue-rotation complement: subtracting from 255 flips each channel independently, which can shift lightness as well as hue. The tool shows the original and inverted swatches side by side so you can judge the contrast at a glance.
Notes and example
Inverting a color twice returns the original, because subtracting twice from 255 cancels out. Colors near mid-gray invert to something very close to themselves, which is why gray-on-inverted-gray has poor contrast — useful to know if you are relying on inversion for accessibility. For a strong accent, start from a saturated, non-gray color: #3498db (a blue) inverts to a warm orange-brown #cb6724, an eye-catching pair.