Skip to main content

Color inverter

Enter a color and get its inverse, the photo-negative color, next to its complementary hue. «Opposite color» can mean either, and for most colors they are different.

Inverted (RGB)

#CBABAA

255 minus each channel: rgb(52, 84, 85) → rgb(203, 171, 170). The photo-negative color.

Complementary hue (HSL + 180°)

#553534

The hue turned half way round the color wheel; saturation and lightness stay the same.

The two answers differ: inversion also flips light and dark, the hue complement keeps the lightness.

Inversion and complement, side by side

RGB inversion subtracts each channel from 255, the way a film negative or an «invert colors» filter does. The complementary hue is the color on the opposite side of the HSL color wheel, with the same saturation and lightness. The hue is turned exactly, without rounding to whole degrees.

ColorInvertedComplementary hue
#FF0000#00FFFF#00FFFF
#00FF00#FF00FF#FF00FF
#0000FF#FFFF00#FFFF00
#345455#CBABAA#553534
#FFD700#0028FF#0028FF
#000000#FFFFFF#000000
#808080#7F7F7F#808080

Color inverter: questions

How do I invert a color?
Subtract each RGB channel from 255. rgb(52, 84, 85), which is #345455, becomes rgb(203, 171, 170), #CBABAA. In hex you can do the same per digit: each digit d becomes F − d, so 3→C, 4→B, 5→A.
Is the inverted color the same as the complementary color?
Not in general. Inversion flips every channel, so it also turns light into dark. The complementary color on a color wheel keeps the lightness and saturation and only turns the hue by 180°. They agree for pure saturated colors such as red and cyan; for #345455 inversion gives #CBABAA and the hue complement gives #553534.
What is the inverse of grey?
Inverting #808080 gives #7F7F7F, nearly the same grey, because 128 is almost the middle of 0–255. A grey has no hue, so its complementary hue is the grey itself.
What is the opposite of white?
Black, by inversion: 255 − 255 = 0 in every channel. White has no hue, so the hue complement leaves it white.
Can I invert the colors of a whole image?
Not on this page: it inverts one color. An image is inverted the same way, every pixel’s channels subtracted from 255.