On 10/11/2010 06:02 PM, tamss13 wrote:
> I have read and looked at tutiorals and I just cant get it to work.
> All I am trying to do is change the color of a gif and png.  They are for a 
> website and I just need to change the color of the objects.  That is all.
> Any help in very simple terms would help

Simple method if you have very clean colors borders (no antialiasing):

1) Set the foreground color to your final color

2) Start the color selection tool (betwen the magic wand and the 
scissors in the tools palette). Set the treshold to "0". Click any part 
of the icon that is with the "old" color. This will select all the parts 
of the image that have the very same colors

3) Start the bucket-fill tool (bucket icon). select "FG color fill", and 
"Fill whole selection". Click somewhere in the selected areas.

4) Done.

More complex method that also covers anti-aliased border:

1) Menu: Colors/Color to alpha... Click on  the color bar, and in the 
next dialog use the color picker on a spot of the color you want to 
change. This should replace the "old" color with a checkboard pattern 
(this indicates the image has become transparent at these places)

2) Set the background color to your final color

3) Open the layers dialog (Ctrl-L or Windows/Dockable dialogs/Layers)

4) Add a new layer (right click and Add new layer), or use the icon with 
the "+" at the bottom. In the dialog, use a fill t  original oneype of 
"Background color"

5) In the layer dialog, drag this dialog under the  original one. You'll 
see this layer through the "holes" punched at step 1) in the original 
layer, in effect replacing the color.

6) You can then save the picture directly as GIF/PNG/JPG (Gimp will 
"flatten" it automaticaly). Note that if at this point you also save the 
picture as XCF you can produce other versions with different colors by 
just replacing the color of the bottom layer.

Since I have often seen this question asked to match the color of some 
background over which the picture appears, and even better solution in 
this case is to save the picture  right after step 1) in a format that 
support transparency (PNG or GIF).


Gimp-user mailing list

Reply via email to