header image
 

Erasing the Colour (color) Cast Blues

Photo: ColourBalance.js exampleThis is an 8bit version of my Colour (color) Cast Removal script for Adobe PhotoShop (a 16 bit version should be arriving shortly as soon as I rip out the 8bit checking) This script will not alter your original image as it creates an adjustment layer. This has two objectives. Firstly, to leave the orginal image unchanged and undamaged. Secondly, to permit you to turn the layer on and off to see the effect and or make any further adjustments.

I have found the script very useful for detecting otherwise undetectable colour casts as the script does not rely on the human eye but on analysis of individual RGB histograms.

I have been using this script now for two years on hundreds of images and in that time I have not ever seen it get it wrong. That’s not to say that it hasn’t made images a little cool or warm for my liking but that it has never ruined an image. Even sunrises and sunsets fare well under this script. Daylight shots with white balance set to tungsten can be repaired.

Description: This JavaScript aligns RGB midtone values to the histogram’s mean. This is achieved by averaging the sum of the mean values of each channel’s histogram and then adjusting the separate color balance midtone channel values to match this average. NOTE: This is not the same as ‘Auto Color’ which will often alter tonal relationships and contrast which sometimes works out well but more often than not is a PITA.

Requirements: With Adobe PhotoShop CS it can be run/selected from anywhere i.e. File > Scripts > Browse. If using PhotoShop 7 however, you will need to download and install the SDK from Adobe in order to run the script. Note that I have only run this script on Wintel platforms (W2k & XP) and not Apple MAC. For those of you who don’t have any of the above described installations then you may be able to achieve the same results by using the Example Manual Process described below albeit sans adjustment layer.

Version: 2003.11.23b

Rights: Copyright (c) 2003 John Mackay

License: GNU General Public License

It’s simple and effective. Feel free to check-it-out and let me now what you think.

Download

Example Manual Process

  1. Select Image > Histogram
  2. Get red channel mean value from histogram e.g. 78
  3. Get green channel mean value from histogram e.g. 52
  4. Get blue channel mean value from histogram e.g. 93
  5. Calculate average of mean RGB values e.g. (78+52+93)/3=74
  6. Select Image > Adjustments > Color Balance (to adjust RGB values to average of 74)
  7. Adjust color balance in Red channel to -4
  8. Adjust color balance in Green channel to +22
  9. Adjust color balance in Blue channel to -19

~ by John Mackay on October 2, 2005.

Leave a Reply




Protected by WP-Hashcash.