Friday, September 4, 2009

GIMP: Changing Colors In An Image - Quick and Easy.

I've read about changing colors in comments somewhere on a tutorial site, but I have yet to find the tutorial that explains how its done. So I did a little digging and discovered just how easy it is to do. Perhaps everyone already knows how to do this and I am just a late bloomer in GIMP. If you have no idea of what I am talking about, follow along.

For testing purposes, I grabbed a picture off Google Images of a purple shirt.



This was simple enough. If you want to grab this photo to test with, be my guest and (right click the image and save as or copy/paste into Gimp) grab it.

Step 1:

I assume you have GIMP already opened and the picture above pasted or opened. Go to Colors - Hue Saturation:






You'll see this:




Looking at the purple shirt, we notice there is more blue than red or magenta (funky purple color). So you will select the "B" radio button and give it a tick.


Start moving the Hue slider to your desired color.

I've tried using Overlap and it didn't produce any results, that I could notice. The reason for that is because (according to the GIMP manual) this slider lets you set how much color ranges will overlap. This effect is very subtle and works on very next colors only. (Click here for more information.)
You can lighten or darken your color choice with the lightness slider. (Keep in mind that using the darker end of this slider could result in color blotches showing on your drawing, to avoid this, go to Select - Color select, and begin selecting the colors in the shirt while holding the Shift key until most all the colors of the shirt are selected, before using Hue-Saturation. I have had good success dragging my cursor through the shirt colors.) * The idea is to only get the shirt area selected and NOT the shaded areas (drop shadows)*

You can select the richness of the color by using the Saturation slider.

If you screw up, click reset and start all over. Make sure preview is ticked so you can see the results on the image.


Step 2:

Click "OK" to save the selection to your image.

That's it, you're done. (If you don't like the resutls, CTRL + Z and start all over.)


Step 3: (For more involved images with lots of similar colors)

What if you had a picture of 3 or 4 people and two people were wearing the same shirt color, but you only wanted to change one shirt color and not both? The method for doing this is very simple:

Isolate the part of the image with the color you want changed by using the Free Select tool. Note: you don't have to follow the colored item perfectly, just put a selection around it so the Hue -Saturation filter knows you only want that selected area changed. Otherwise, if you don't, when selecting the color to change, ALL colors similar to your selected choice within the image will change. See the image below for an example of what I mean:





Had I not selected the sleeve area, the entire shirt would have changed to the green color.

You could even use this technique to add stripes or patterns to clothing.  But if you decide to do this, you need to select antialiasing AND add about a 3 - 5px feather to the Free Select tool in the tool options dialog. If you don't, your selection will leave you with some jagged looking lines in the image.





The shirt result with antiliasing and feather edges (5px) selected:




This technique could come in handy if you wanted to show support for your favorite team by changing the colors in your image to that of the team's colors.

Final:

Just remember that for this to be effective, pick the closest primary color to the color in the image you want changed. If several areas in the image share the same primary color, then isolate what you want changed by placing a selection around it before using Colors  -  Hue-Saturation.

A little something I did in support of the Kansas City Chiefs:






Have fun! :)

No comments:

Post a Comment

If you intend to comment to complain about being unable to perform certain steps with tutorials, please explain where you are in the step process and what step you are unable to get to work correctly, instead of saying something like, "I can't do this!". Your comments will help get tutorial corrections made and help give clarification to future viewers who may have trouble in the same locations. Thank you. :)