Invert Color

Invert a colour to its RGB opposite, shown as a swatch.

Colour
Inverted
Runs locally in your browser

About the Invert Color

Inverting a colour subtracts each RGB channel from 255, producing its photographic negative: white becomes black, and a colour becomes its opposite. This tool inverts the colour you enter and shows the result as HEX and RGB with a swatch. It is a quick way to get a contrasting colour or to see what a negative would look like.

The operation is exact and its own reverse, since 255 minus 255 minus a value returns the value. Mid-grey is very nearly its own inverse, so #808080 maps to #7f7f7f, which catches people out when they invert a grey interface expecting a dark theme and get almost the same screen back. Building a dark theme means remapping lightness on purpose, not flipping channels wholesale.

Where inversion does earn its keep is in producing a photographic negative, in flipping a monochrome icon so it survives on a dark background, and in generating a guaranteed-different colour when you need one for debugging. For a pairing that is legible rather than merely different, check the result with the Contrast Checker, because a colour and its inverse are not always far enough apart in luminance to be readable together.

Note that the RGB inverse is not the same as the complementary colour on the colour wheel; for a harmonious opposite, use the complementary option in the Palette Generator. To desaturate instead, the Grayscale Converter.

How to use

  1. Enter a colour.
  2. Copy the inverted colour.

Common questions

Is the inverse the complementary colour?
No. The RGB inverse and the colour-wheel complement differ. Use the Palette Generator for a true complementary colour.
What does white invert to?
Black, and black inverts to white.
Is alpha changed?
No, only the colour channels are inverted.