Using the inverter
Enter the colour
Type a HEX code, an
rgb()orhsl()value or a CSS colour name, or use the picker next to the box.Compare the three swatches
Original, inverted and complementary hue appear side by side.
Copy what you need
A small table gives the HEX and RGB values of the inverse and the complement, each with a copy button.
Check the contrast
A note gives the contrast ratio between the original and its inverse, a reminder that opposites are not always readable together.
Example: a red call-to-action button
A web designer has a brick red booking button, #C0392B, and wonders what to pair with it. Inverting gives #3FC6D4, a light turquoise, which is rgb(63, 198, 212). The complementary hue is #2BB0BF, a slightly deeper teal with the same strength as the original red.
The contrast between the red and its inverse is only 2.65:1, so turquoise text on the red button would be hard to read. The designer keeps white text on the button and uses the teal as a secondary accent elsewhere.
#C0392B
Inverted #3FC6D4, rgb(63, 198, 212) Complementary #2BB0BF Contrast with inverse 2.65:1
Why mid-tones are tricky
Inverting black gives white and the contrast is perfect. But a mid grey such as rgb(128, 128, 128) inverts to rgb(127, 127, 127), almost the same colour. Most brand colours are mid-tones, so their inverses are rarely good text colours on top of them. Use the contrast checker before relying on an inverted pair for anything people need to read.
Questions people ask
How do you invert a colour code?
Subtract each channel from 255. For rgb(192, 57, 43), that gives rgb(63, 198, 212). In HEX, #C0392B becomes #3FC6D4. The tool does this for any HEX, RGB, HSL or named colour you enter and shows the result next to the original.
Is an inverted colour the same as a complementary colour?
No. Inversion flips lightness as well as hue, so a dark red becomes a light turquoise. A complementary colour only rotates the hue by 180 degrees and keeps the lightness and saturation, so a dark red becomes a dark teal. The page shows both so you can choose.
Can I invert a whole image?
This page works on one colour at a time. To make a negative of a photo or logo, use the image filters tool and tick Invert colours, or the Negative preset, then download the result.
Where your data goes
The inversion is simple arithmetic done in your browser. No colour you enter is sent anywhere.
Checked against the tool on