Removing color cast from photos in Photoshop

It often happens that our photos have some sort of color cast. This can be introduced by using wrong color balance when taking a photo or during post-processing. So in this tutorial I will show you a few ways on how to get rid of this issue from your photos. The techniques presented here will go from the very basic automatic ones, to a bit more advanced requiring some use of Photoshop tools.

Please also note that each of below methods might yield slightly different result and not all of them will work equally good for all photos, so it’s good to know several techniques.

Here is the image I’ll be working with today:

Photo before removing color cast from it.

It has slightly exaggerated color cast which will be useful to illustrate various method of removing it. There is definitely too much purple or blue in the image what’s especially visible in sand on the left.

Removing color cast automatically

In fact there is automatic tool in Photoshop that attempts to remove color cast from your images. You can access it from Image -> Auto Color.

However, as it is fully automatic tool, it doesn’t get the job done correctly every time and leaves you no control over adjustments it makes. This together with the fact that it often guesses wrong is why I hardly ever use it. But sometimes, especially for some obvious color casts, it can create very good results so it’s good to know it’s there as it can save you some time.

Here is how this method did for our example image:

Auto Color

Although it managed to remove purple cast completely it also introduced (or left) cyan or green tint in the image. Also the effect is too strong for me as a bit of purple would still be nice as it created nice atmosphere in the original image.

Using Match Color

It’s another automatic approach but this time it works sometimes 🙂
  1. Go to Image -> Adjustments -> Match Color
  2. Make sure to check Neutralize checkbox.
  3. If the effect is too strong, drag Fade slider to the right until you’re happy with the result.
  4. Click OK button.

From my experience it seems that this method seems to work fairly well if image has blue or green image cast but not that well where there is some yellowish tint in the picture.

Match Color

As you can see from above, Match Color did much better job than Auto Color. It removed colour cast but also let me keep some purple to achieve the atmosphere I wanted.

Using Average filter

Time for another technique. It’s still very simple one but requires use of some Photoshop tools:
  1. Duplicate your Background layer by Layer -> Duplicate Layer
  2. Use Filter -> Blur -> Average. This turns your layer into one solid color, which is average color of all pixels, which is basically color cast of your image.
  3. Invert color in this layer by Image -> Adjustments -> Invert.
  4. Change blending mode of this layer to Color.
  5. Decrease layer opacity to around 10 – 20%.

Why does it work? Average blur returns average color of your image (it takes all pixels and calculates their mean). As such it can be consider color cast.

What you need to do to remove color cast is to add “opposite” color and that’s why we inverted it in step 3. By changing blending mode to Color, you use this new opposite color instead of the color cast. However, the effect would often be too strong and that’s why we had to reduce effect’s opacity.

Average Blur

Another method and the results are getting even better 🙂 and closer to what I envisioned for this image.

Finding White, Black and Gray Points

Last but not least a technique I use most often. All techniques above made an assumption that color cast is the same for every pixel. But it is not necessarily the case. So this technique is removing color cast from shadows, highlights and midtones separately.

Algorithm below might seem complicated at first but once you get to know it, you will be able to perform it in a few seconds. We’ll start by finding color of highlights, shadows and gray point in steps 1 to 11. Normally these should be white, black and 50% gray respectively. But if they aren’t that means there is color cast in them. In steps 12 to 17 we remove this color cast from them.

  1. Start by creating Threshold adjustment layer just above your Background layer.
  2. Set Threshold Level to 255 in Threshold adjustment layer and start dragging the slider to the left until you start to see white areas in your image. These white areas correspond to highlights in your image.
  3. Select Color Sampler Tool and click on one of the white areas. By sampling these areas you know the color of highlights. If they aren’t close to white that means they have color cast.In this example it was necessary to set the Threshold Level to around 240 for white areas to appear.
    Sampling highlights
  4. Now set threshold level to 1 in Threshold adjustment layer and start dragging the slider to the right until you start to see black areas in your image. These black areas correspond to shadows in your image.
  5. Select Color Sampler Tool and click on one of the black areas. By sampling these areas you know the color of shadows. If they aren’t close to black that means they have color cast.In this example it was necessary to set the Threshold Level to around 6 for black areas to appear.
    Sampling shadows
  6. Now we’ll find gray point color cast. For this, create new layer (Layer -> New -> Layer).
  7. Go to Edit -> Fill.
  8. Select 50% Gray for Contents and click OK button.
  9. Set blending mode to Difference. Your image will now look something like this:
    Difference blending mode

    It does look strange so let me explain what’s going on. Difference blending mode shows differences between current & bottom layers. If pixels in both layers are identical, output will be black. The bigger the difference, the lighter the output. It will be white for completely different pixels.

    Now, we filled our layer with 50% Gray which can be considered neutral color for midtones. So areas similar to this color will be very dark, almost black.

  10. Now set threshold level to 1 in Threshold adjustment layer and start dragging the slider to the right until you start to see black areas in your image. This time black areas correspond to midtones of your image.
  11. Select Color Sampler Tool and click on one of the black areas. By sampling these areas you know the color of gray point. If it isn’t close to 50% gray that means it has color cast.In this example it was necessary to set the Threshold Level to around 6 for black areas to appear.
    Sampling midtones
  12. Now remove (or hide) both Threshold layer and 50% Gray layer as they won’t be needed anymore.
  13. Create Curves adjustments layer.
  14. Select White Point picker from layer’s settings and click on the 1st sampler point (one in the highlights).
  15. Select Black Point picker from layer’s settings and click on the 2nd sampler point (one in the shadows).
  16. Select Gray Point picker from layer’s settings and click on the 3rd sampler point (one for the gray point). By performing steps 14 to 16 you will notice that shape of the curves in Curves adjustment layer changed.
  17. If you find the effect too strong, decrease layer opacity until you like the results (in the image below I set opacity of the effect to around 30%). Color cast should now be removed.

And here is the result:

Fixing shadows, highlights and midtones

I think that this method produced the best results. The image is now much warmer and color cast was removed.

Summary

This tutorial presented 4 ways of removing color cast from your images, from 1-click automatic method, to more advanced ones. Even though automatic methods didn’t yield perfect results in case of example image, there are cases when they are sufficient so it’s good to know them.
Also there are numerous other techniques dealing with color cast issue but as most of them is more complicated I think that they deserve separate articles so I might describe them in the future.

2017-01-17T19:42:38+00:00 October 8th, 2014|Posted in: landscape, tutorial|