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:
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
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:
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
- Go to Image -> Adjustments -> Match Color
- Make sure to check Neutralize checkbox.
- If the effect is too strong, drag Fade slider to the right until you’re happy with the result.
- 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.
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
- Duplicate your Background layer by Layer -> Duplicate Layer
- 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.
- Invert color in this layer by Image -> Adjustments -> Invert.
- Change blending mode of this layer to Color.
- 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.
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.
- Start by creating Threshold adjustment layer just above your Background layer.
- 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.
- 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.
- 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.
- 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.
- Now we’ll find gray point color cast. For this, create new layer (Layer -> New -> Layer).
- Go to Edit -> Fill.
- Select 50% Gray for Contents and click OK button.
- Set blending mode to Difference. Your image will now look something like this:
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.
- 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.
- 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.
- Now remove (or hide) both Threshold layer and 50% Gray layer as they won’t be needed anymore.
- Create Curves adjustments layer.
- Select White Point picker from layer’s settings and click on the 1st sampler point (one in the highlights).
- Select Black Point picker from layer’s settings and click on the 2nd sampler point (one in the shadows).
- 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.
- 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:
I think that this method produced the best results. The image is now much warmer and color cast was removed.