How to invert brightness-only (not colours) in GIMP

In this article, I’ll show a solution of how to invert the brightness of an object in GIMP without inverting the colour.

When the Invert option is used in GIMP, it will invert both the brightness and colour, which is generally a problem if all we want to do is let’s say invert the brightness of writing or of a dark/bright object in an image.  I have encountered this problem on several occasions and all I got with searching the internet was similar questions with answers saying to use another image editing tool, use the colorize tool after inverting, etc. or just answered questions.  So hopefully this article will help some out.

To give an idea, let’s say we have the following image:


We would like to invert the brightness such that we end up with:


The above also gives an idea where methods such as using the colorize tool do not work.

To start with, we need to select what to invert the brightness of.  In this example, I used the magic wand tool with a threshold of 50.  Note that “Antialiasing” and “Feathered edges” must not be ticked, as this process does not seem to work well if either is ticked.


Next, to cover the areas around the selection which are difficult to catch with the magic wand tool, go into the “Select” menu, click “Grow” and specify the number of pixels to grow the selection by.  Here, we grew the selection by 2 and zoomed in to have a close look:


Now, we start by inverting the color.  To do this, go into the “Colors” menu and select “Invert”.


To fix the colours, go into the “Colors” menu, select “Hue-Saturation…” and set the “Hue” to ‘-180’:


After we apply this, we end up with the following (deselected).  Don’t deselect just yet…


We’re almost there now.  One thing we need to fix is the rough-edges:


Click the Blur/Sharpen tool (looks like a water drop), choose the “Circle Fuzzy” brush (3 or 5 is sufficient), set the “Convolve Type” to “Blur” and set the Rate to “100”:

Invert_B8 Invert_B9

Go into the “Edit” menu and select “Stroke Selection…”  Tick the “Stroke with a pain tool” and choose “Convolve” from the drop-down list:


Click ‘Stroke’ and if all goes well, you should end up with the brightness inverted with the colour intact.  Note that this is not a perfect approach, but it’s as close as I could figure out, at least in GIMP.  For example, in the following, there is some slight brightness showing around the ‘g’, although this can be easily fixed with the clone tool.  The sharper the edges of the object/writing to be inverted in brightness, the better.


Leave a Reply

Your email address will not be published. Required fields are marked *