Color inverter
Enter a color and get its inverse (255 minus each channel, the idea behind a photo negative) next to its complementary hue. «Opposite color» can mean either, and for most colors they are different.
Inverted (RGB)
255 minus each channel: rgb(52, 84, 85) → rgb(203, 171, 170). The idea behind a photo negative.
Complementary hue (HSL + 180°)
The hue turned half way round the HSL color wheel; saturation and lightness stay the same.
The two answers differ: inversion also flips light and dark, the hue complement keeps the lightness.
Which one to use: Inverted for a negative look, like an «invert colors» filter; Complementary hue for a color that goes with yours in a palette.
Inversion and complement, side by side
RGB inversion subtracts each channel from 255, the way an «invert colors» filter does. It is the simple idea of a photo negative; real color film works differently. 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.
| Color | Inverted | Complementary 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 the HSL color wheel keeps the lightness and saturation and only turns the hue by 180°. The two agree exactly when the lightest and darkest channels add up to 255, as in #FF0000 (both give cyan) or #9F6060; for #345455 inversion gives #CBABAA and the hue complement gives #553534. Painters’ RYB color wheel puts other colors opposite each other: on it red is opposite green, not cyan.
- 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.