How to change an image colour

I was stuck with a problem the other day and I found a neat little solution that I will now share with you. If ever you have had to completely recolour a site whilst doing some web design then you might have come across this. I use the GIMP in all of my image editing, but I’m sure the same technique will work in Photoshop.

Take the following image, in a "gif" format.

It isn’t a particularly nice shade of green so I wanted to change it to something more fitting with the site, namely an orange colour. Firstly I had to change the image mode so that it would accept more colours. This is because the image had been set to "indexed" which basically means that all of the colours have been optimised to reduce the file size. To work with more colours you need to change the mode to RGB. This can be done by going into Image > Mode > RGB. I had tried to play with colour and contrast settings, but I just couldn’t get the colour I wanted.

Next, create a new layer. You don’t need to set transparency or anything like that, but it doesn’t matter if you do. Select the Blend Tool from the tool box and select the gradient to be Full Saturation Spectrum CCW. Draw a single line from one end of the image to the other, this will basically fill the image with a spectrum.

Go into the layers control for the new layer and select a different mode. This changes the colours on the bottom layer dependent on what colour is on the layer above it. In the following screen shot I have selected Divide, but you can play with the mode until you find the colour you are looking for. Divide one has the orange I need so I will use this one.

Using the colour picker tool you can now click on the colour you want from the spectrum. This will change your primary colour to whatever you clicked on. Note that the colour on the GIMP control panel will probably be different from the one you clicked on due to the way in which the colours and transformed through the mode selection. Even though I clicked on the orange on my image I now have an odd shade of light blue as my primary colour.

Next, select your Pencil Tool and a large brush and just completely colour in the image. You will now find that it’s colour has changed to the colour you wanted.

Using this technique involves no messy playing with colour and saturation settings, but the best thing is that you can just use the same colour/layer/mode combination for other images that have the same colour scheme. Once you have the right colour on the first image then changing the rest will be easy!

Phil
Programmer, Research and Development

Leave a Reply

Your email address will not be published. Required fields are marked *