A color gradient is an effect that covers your whole image and can ruin an otherwise good image. Gradients can come from various sources but the most common is light pollution caused by external sources like the Moon and artificial lighting.

This article walks you through a simple process you can use to remove the color gradient from your images using the online editor, Photopea or you can use PhotoShop or GIMP.

Update: Since this article was published, I wrote another article that shows you how to remove a color gradient that’s softer than this one. If your results with this process are not good on your own images, try the process here: Remove A Soft Color Gradient From Your Images.

Update February 2023: There’s a more effective way to remove gradients using a free, open-source application called GraXpert – learn about it in this article.

The Result

Note: The images in this article have been compressed to save space on the screen. You can download the full-size images here so you can more easily observe the difference in the before and after images.

First the results – this is an image of IC 1254 as taken on the Slooh Canary One telescope:

The image has a red cast to it, which is the gradient effect.

Here’s the same image with the gradient removed:

You can download the original images to more easily observe the difference.

Observe that image is much better with the red cast having been removed from it.

Removing the Color Gradient Using Photopea

You can edit this image using Photopea, an online Photoshop-like clone at https://www.photopea.com/

Note that you can also follow these directions unchanged for Photoshop and with some slight modifications, you can do this in GIMP too.

I won’t describe the basics of using Photopea here – I discuss the basic usage of Photopea in other tutorials on this site; however, if you are savvy, you’ll be able to follow these steps.

Start by opening your image (select File – Open, and locate your image).

If you don’t have an image with a gradient on it, download the ZIP file that contains the before and after images and use the ‘before’ image to try out these steps.

Next, duplicate the background layer by finding it in the Layers panel on the right, right-click the one called ‘Background’ and select Duplicate Layer as shown:

From the menu select Filter – Noise – Dust and Scratches to bring up a new window as shown:

Enter or select the values as shown – Radius 15px and Threshold 1px. This changes your image quite a bit, and this is normal.

Set the layer’s opacity to 40% by clicking the arrow next to the Opacity option in the Layers panel and selecting or entering 40%, as shown:

You’ll again see your image when you make this adjustment.

Select the Blending Mode to Color by clicking the arrow next to where it says ‘Normal’ and locate ‘Color’, as shown:

From the menu, select Image – Adjustments – Invert. This makes your image black and white.

Merge the layers by selecting from the menu Layer – Merge Down. You won’t see a change in your image yet you have merged the layer you duplicated with the original one.

Adjust the Hue and Saturation by selecting from the menu Image – Adjustments – Hue/Saturation and enter or select the values as shown:

If you tried with your own image, you might still notice a color gradient, as was the case with this image.

We can improve the result even more by going through the steps again and observing the effect. I arrived at the sample file ‘ic1245-gradient-removed-iteration-2.png’ by running through this process twice.

If you find that too much color was removed by this process, there’s another version that’s softer than this one here: Remove A Soft Color Gradient From Your Images.

Save your image by selecting File Save as PSD or Export As to save it in the format you want to use.

Conclusion

In this tutorial, you learned how to remove the color gradient on your images by using Photopea to manipulate an image.

Before You Go…

While you’re here, consider downloading my Free book about Slooh.com – Remote Astrophotography Using Slooh.com – A Handbook.

Check out more posts in my blog too!