Removing Background Colour Cast

Often when shooting long exposure astrophotography, the sky background does not turn out black. This is due to emissions from oxygen in the upper atmosphere. In some locations, light polution casts a red - brown tinge to the sky. Fortunately this background cast can be easily removed using your favorite layer capable image editor. The example below uses Paint Shop Pro, but the method works equally well in Photoshop or Gimp.

First let's take a look at the original shot of M78 with a reddish sky background.


















The trick here is to use another layer and a difference combine to remove the colour cast.

  1. Open the image in your favorite image editor and call the layer "A"
  2. Sample the sky background in an area well away from any stars or nebulosity. The background in this image has an RGB value of 94:74:63
  3. Create another layer on top of this image, name it "B" and set its combine mode to difference as shown to the right
  4. The idea is to leave the background at about 20:20:20 so set the colour to 74:54:43 and fill layer B with it.
  5. Flatten the layer stack to obtain the final image as shown below.