Colour Inversion in Photoshop

Terry Johnson
5 min readMay 25, 2022

--

Introduction

An online search reveals that there are already plenty of articles and videos on the subject of colour inversion. So, is there a need for another article?

Well, it all depends on what you expect of ‘colour inversion’.

Look at the image below. It has been decomposed into two constituent parts. One part represents the shading information. The other the chromatic content.

So, there are two possibilities for colour inversion. One possibility is that the shading and the chromaticity are both inverted together. The other is that only the chromatic content is inverted. Most articles on colour inversion address the first possibility but not the second.

The first inversion option might more correctly be called ‘image inversion’. To achieve this, you can load an image into Photoshop and then select Image>Adjustments>Invert. The outcome is shown below for the specimen image. It can be seen that the colours have been inverted but also, for example, the clouds which were formerly white now appear back. It could be argued a change from white to black does not come under the remit of ‘colour inversion’ since neither black nor white appear on a conventional colour wheel.

The second option might be called ‘chromatic inversion’. It should retain the white clouds and the other shading information but modify the colour. You might think that this would be difficult to achieve but in fact it so easy that I almost feel embarrassed to tell you about it.

What you need to do is to load your image into Photoshop and to select Image>Adjustments>Hue/Saturation. Adjust the Hue slider to -180 or +180 (rotating the colour wheel by +180 or -180 degrees takes you to the same point). So, there you are: — simple

It is interesting to note that image inversion can be performed completely or not at all. There is no intermediate operation. For chromatic inversion however, fractional inversion is possible. For example, the colour wheel could be adjusted to -150 or to +150 degrees.

I hope you have found this helpful. If you have a little time, I would now like to show you how the preceding ideas could be used as a basis for further image processing.

Building Upon the Basic Concepts

(Note that the following can be downloaded as a Photoshop Action from here.)

It has been shown that there are two possible approaches to colour inversion. One inverts the shading component whereas the other does not. What if an image were to be processed by one variant of colour inversion and a copy of the same image were to be processed by the other variant and then the two processed images were to be subsequently averaged? Since the shading components of the two variants are in opposition, it might be expected that they would cancel out to leave a pure colour image.

This possibility can be explored as follows. Load an image into Photoshop. Select layers and right click on the Background layer. Then select Duplicate Layer to produce a Background copy layer. Repeat this process to form a Background copy 2 layer. Now make the Background copy layer invisible by clicking off the ‘eye’ icon. Highlight the Background copy 2 layer for processing.

Select Image>Adjustments>Invert and then make the Background copy 2 layer invisible. Select the Background layer, then select Image>Adjustments> Hue/Saturation and adjust the Hue slider to -180. Now make the Background copy 2 layer visible and highlight the layer. Set Opacity to 50%. This should give a pure colour image with no shading. Now right click on Background copy 2 and select Merge Visible. Finally, select again Image>Adjustments>Invert and this gives an image which shows just the colours of the original image with no shading.

Now make the Background copy layer visible and select it. Next select Image>Adjustments>Black & White and then select OK. Modify the drop-down list to the left of Opacity to change the blend mode from Normal to Luminosity.

The resultant image is now identical to the original image, but it is compiled from separate shading and colour layers. This allows the possibility that the shading content and colour content of the image can be independently processed.

Here is an example that exploits this possibility of the independent processing of the two image components. Select the Background copy layer, then select Filter>Sharpen>Unsharp Mask. With Threshold unchanged (at a setting of 0 levels), set Radius to 150 and set Amount to 150%. Now select the Background layer and select Image>Auto Contrast. Right click on either of the layers and select Merge Visible.

The final image should look as follows.

The image is somewhat stylised but has an interesting look. An enhanced but less stylised image could be produced by selecting more moderate parameter values or by blending the processed image with the original.

The processing here has been applied separately to the two component layers to achieve a particular outcome. If the Unsharp Mask and Auto Contrast were instead applied directly to the original image then the outcome would be very different as shown below.

(As an aside we should note that not all filter options can be applied to the shading layer. Some options such as the Stamp filter only allow for two levels of luminosity and, in the case where those correspond to full black and full white, no colour can be supported.)

The second part of this article has addressed just one image and just one method of processing for each of the image components. There are many other possibilities. It just needs your imagination!

If you have an interest in image colour processing, then you might enjoy the following article by the same author. A Free-to-Use Web App for Image Colour Transfer Processing.

--

--

Terry Johnson

Retired Systems Engineer, with extensive experience in signal and image processing. A graduate in Applied Physics with a PhD in Mathematical Statistics.