Free color utility

HEX Color Inverter

Turn any hex color into its exact negative. Each 8-bit channel becomes 255 minus itself, so #1a73e8 comes back as #e58c17. Type a value, compare both swatches, then copy the hex or the rgb() pair.

3-digit and 6-digit inputLive swatch previewNo account required

Convert

Invert a hex color

Accepts 3-digit and 6-digit hex, with or without the hash. The negative updates as you type.

Try a preset

Original

#1a73e8

rgb(26, 115, 232)

Inverted negative

#e58c17

rgb(229, 140, 23)

Inversion: #1a73e8 → #e58c17

Parsing and subtraction run in this browser tab; the color is never uploaded.

The math

How hex inversion works

A hex pair is one channel: two hexadecimal digits between 00 and FF. Inversion subtracts that channel from FF, which is exactly what an image editor does to a pixel — one channel at a time.

#RRGGBB → #(FF−RR)(FF−GG)(FF−BB)

Three steps

  1. 1

    Split the hex value into red, green and blue.

  2. 2

    Subtract each channel from 255 (FF in hexadecimal).

  3. 3

    Convert the three results back into hex digits.

Reference table

Common hex inversions

Worked examples you can verify by hand. Mid gray is the interesting case: 128 inverts to 127, so no gray is its own inverse in 8-bit color.

OriginalRGBInvertedRGB
#000000rgb(0, 0, 0)#ffffffrgb(255, 255, 255)
#ff0000rgb(255, 0, 0)#00ffffrgb(0, 255, 255)
#1a73e8rgb(26, 115, 232)#e58c17rgb(229, 140, 23)
#d8ff3ergb(216, 255, 62)#2700c1rgb(39, 0, 193)
#808080rgb(128, 128, 128)#7f7f7frgb(127, 127, 127)
#f05a28rgb(240, 90, 40)#0fa5d7rgb(15, 165, 215)

Why it matters

What an inverted hex is useful for

Four jobs where the exact negative value beats eyeballing a color picker.

Dark-mode drafts

Flip a light surface color to its negative for a starting dark palette, then tune the mid tones. The inverted value keeps the same channel spread, so the tint survives the switch.

Contrast sanity checks

Text drawn in color A on background B reads the same way as text in B on A. Inverting both keeps the lightness gap intact, which makes inverted pairs a quick legibility test.

Negative brand palettes

Print, poster and sticker work often asks for the photographic negative of an accent color. The inverted hex is that exact value rather than a close approximation.

Cross-checking CSS filters

filter: invert(1) on an element produces the same negative as inverting the hex values behind it. When the two disagree, one of them is not a pure inversion.

Know the difference

HEX inversion vs. image inversion vs. CSS filters

Three operations that look identical in a screenshot and do different things to your files.

MethodWhat it reversesWhat it leaves alone
HEX inversion (this page)A single color value: R, G and B each become 255 minus themselves.Pixels, files and alpha — there is nothing here but arithmetic on a color code.
Image color inversionEvery pixel of a PNG, JPEG, WebP or BMP, processed in the browser.Canvas size, pixel positions and the alpha channel of a transparent PNG.
CSS filter: invert(1)How the browser paints an element at render time, including its text.The color values in your stylesheet and the pixels in the original image file.

HEX inverter FAQ

What is the inverse of a hex color?

The color whose red, green and blue channels each add up to 255 with the original. #000000 inverts to #ffffff, #ff0000 to #00ffff, and #1a73e8 to #e58c17.

Is inverting a hex the same as its complement?

No. A color-wheel complement rotates hue by 180 degrees and keeps lightness and saturation. Channel inversion works in RGB and reverses lightness too, which is why a dark blue comes back as a light warm orange.

Why does gray not invert to itself?

#808080 is 128 per channel, and 255 − 128 is 127, so it becomes #7f7f7f. A value that inverts to itself would have to be 127.5, and an 8-bit channel only holds whole numbers.

Can I invert transparency or alpha?

Not on this page. Hex codes carry no alpha channel, so there is nothing to reverse. The image inverter processes RGB only and leaves PNG transparency untouched.

Does 3-digit shorthand behave the same way?

Yes. #0af is expanded to #00aaff before the subtraction, so it inverts to #ff5500. Short and long forms always produce the same result.

Is my color sent to a server?

No. The input is parsed and inverted by JavaScript running in your browser, and nothing is stored or logged.

Inverting a color code and inverting a picture are different jobs — pick the one that matches your file.

Next step

Invert the color, then invert the picture

When the job is a photograph, sprite sheet or logo file rather than one color value, the image inverter applies this same channel math to every pixel and gives you back a full-resolution PNG, JPG or WebP.

HEX Color Inverter – Invert HEX & RGB Colors Online Free