Results 1 to 8 of 8

Thread: Change blues to greens in metacity png files?

  1. #1
    Join Date
    Aug 2005
    Beans
    5,986

    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



    Screenshot sample of a blown up image in gimp,

  2. #2
    Join Date
    Aug 2011
    Beans
    2

    Talking 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

    Peter

  3. #3
    Join Date
    Mar 2012
    Beans
    776
    Distro
    Ubuntu Development Release

    Re: Change blues to greens in metacity png files?

    In Gimp I would try: colors/map/color exchange (or just type color exchange in HUD if you are using Unity).

    - 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..." )
    In English version this item is called colorize, however I am not sure if that method is accurate enough for what he would like to do.

    Hope this helps.
    Last edited by GreatDanton; September 26th, 2012 at 05:35 PM.

    I DON'T EVEN KNOW WHAT A QUANTAL QUETZAL IS...BUT IT SOUNDS LIKE PRETZEL AND I LIKE PRETZEL

  4. #4
    Join Date
    Aug 2005
    Beans
    5,986

    Re: Change blues to greens in metacity png files?

    Thanks I've tried these suggestions already but not getting anywhere.

  5. #5
    Join Date
    Mar 2012
    Beans
    776
    Distro
    Ubuntu Development Release

    Re: Change blues to greens in metacity png files?

    If previous suggestions are not working, then it will be best to ask at Gimp forums, since there hang experts for such things.

    http://gimpforums.com/

    Regards.

    I DON'T EVEN KNOW WHAT A QUANTAL QUETZAL IS...BUT IT SOUNDS LIKE PRETZEL AND I LIKE PRETZEL

  6. #6
    Join Date
    Aug 2005
    Beans
    5,986

    Re: Change blues to greens in metacity png files?

    Thanks all.

    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

  7. #7
    Join Date
    Oct 2012
    Beans
    17

    Re: Change blues to greens in metacity png files?

    If (and it is a big if) you can figure out how the colour matrix in convert works, then something like the example in http://www.imagemagick.org/script/co...p#color-matrix will probably work. My best guess would be something like:
    Code: [Select]

    " 1.0 0.0 0.0 0.0, 0.0, \
    0.0 0.0 1.0 0.0, 0.0, \
    0.0 1.0 0.0 0.0, 0.0, \
    0.0 0.0 0.0 1.0, 0.0, \
    0.0 0.0 0.0 0.0, 1.0" \
    for a colour matrix, and then use a shell loop to apply it to all files. I would most definitely make a backup copy first before trying it.

  8. #8
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    1,689
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: Change blues to greens in metacity png files?

    Quote Originally Posted by mips View Post
    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •