Change blues to greens in metacity png files?

Hi,

I'm trying to edit the Greybird gtk/xfce theme so all blues are replaced by greens which has been easy using the gtk theme preferences utility. Problem is all the little .png files for the buttons etc in the metacity & unity folders are in blue

I need to find an easy way to change all of these little png files. Say we have a blue colour #398EE7 it must be changed to #39E78E so in essence I'm swapping the green & blue byte values around. Every png has several shades of blue in it to create a gradient for the little buttons so quite a few values need change.

Any ideas?

Please be specific in your responses as I know zip about gfx art and don't have a single artistic bone in my body

Re: Change blues to greens in metacity png files?

Try Gimp
- Colour (Menu)
- select Colouring (or whatever the thrid entry is called in English; I am German so I use the German version, there it says "Einfärben..." )
- play around a bit and find the colours you want

Re: Change blues to greens in metacity png files?

Not being great at this sort of stuff I used Tools->Colorise to to change the .png files, it came close enough for me seeing they are so small the eye does not pick up the minor differences.

For the .xpm files it was harder as they had grey borders that form part of the window theming. Here I used a combination of Tools-Selection->By Colour Slelect followed by Tools->Colorise but this did not cover all the pixels so in a few of the images I also had to do a Colours->Map->Colour Exchange...

I'm pretty sure there is a much easier way to do this but for now I achieved what I wanted to at the expense of double vision & sore fingers

Re: Change blues to greens in metacity png files?

Originally Posted by mips

Hi,

I'm trying to edit the Greybird gtk/xfce theme so all blues are replaced by greens which has been easy using the gtk theme preferences utility. Problem is all the little .png files for the buttons etc in the metacity & unity folders are in blue

I need to find an easy way to change all of these little png files. Say we have a blue colour #398EE7 it must be changed to #39E78E so in essence I'm swapping the green & blue byte values around. Every png has several shades of blue in it to create a gradient for the little buttons so quite a few values need change.

Any ideas?

Please be specific in your responses as I know zip about gfx art and don't have a single artistic bone in my body

Screenshot sample of a blown up image in gimp,

Can't see the real image so I'm only guessing from your screen shot; but I would try:
- "Layer/Transparency/alpha to selection". This will do a partial selection on the semi-transparent gray borders. The question is whether this is above 50% selection or not, if under 50% , the marching ants won't include them (then ants march on the 50% frontier). This will be your lucky day.
- "Select/Sharpen": this is actually a threshold on 50% transparency, so if it is your lucky day you will be left with only the blue stuff selected (by definition, the marching ants will still be on the same line). If its not your lucky day, you have to threshold the selection for a value greater that 50%: "Select/Save to channel", then edit channel, apply Threshold tool, and "Channel to selection".
- paint new gradient with required color (it will only be applied to pixels in selection).

Otherwise, you can also have a shot at "Colors/Map/Rotate colors"

Otherwise, for this kind of image it is often quicker to redo them from scratch:
- create base shape on transparent layer, filled with white
- duplicate layer
- Alpha-lock the top layer ("Lock" checkbox at top of layers list)
- Apply gradient to top layer (due to alpha-lock it won't change pixels opacity)
- Shift top layer vertically
- Adjust opacity of white layer
- Save as XCF
- Export as PNG or else