Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Does anybody know if these themes are compatible with the latest version of gtk yet?

I like the ambiance theme but would like the orange highlights to be blue or what ever I fancy at the time.

Please also feel free suggest any alternatives.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Well you can edit the CSS files of GTK to change the selection color:

  1. Make a text file called something like colour.sh and paste the blow lines into the file.
    oldcolor=f07746
    newcolor=f0cb46
    old_progress_bar_color=db6a3c
    new_progress_bar_color=dbb93b
    sed -i "s|$oldcolor|$newcolor|g" /usr/share/themes/Ambiance/gtk-2.0/gtkrc
    sed -i "s|$oldcolor|$newcolor|g" /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
    sed -i "s|$oldcolor|$newcolor|g" /usr/share/themes/Ambiance/gtk-3.0/settings.ini
    sed -i "s|$old_progress_bar_color|$new_progress_bar_color|g" /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css
    
  2. Make this script executable, enter in a terminal chmod +x colour.sh
  3. Now type sudo ./colour.sh in the terminal to run the script and put your password when prompted.
  4. Logout and login back, and the selection color is changed to light yellow (from the default orange).

Above script changes the selection and progress bar colors to yellow, as seen in the image below.

enter image description here

This works everywhere except nautilus filecopy progressbar. Ambiance uses a png image file to paint progress bar of filecopy dialog (the file is this: /usr/share/themes/Ambiance/gtk-3.0/assets/progressbar-vertical-fill.png and /usr/share/themes/Ambiance/gtk-3.0/assets/progressbar-horizontal-fill.png). Now you need to do some image magic via gimp to convert these images' color from orange to yellow via color transformation (this is "Colorize" in gimp). A detailed tutorial for the same can be found here.

Window border buttons, check boxes, radio buttons and everything else is all rendered from png files, which are located in /usr/share/themes/Ambiance/gtk-3.0/assets, /usr/share/themes/Ambiance/gtk-3.0/assets and /usr/share/themes/Ambiance/metacity-1. These images need to be converted from orange to yellow. There should be a way to automate this color conversions via scripting. The superuser link on how to change colors in image should help with all this.

NOTE: You can find a full list of hex codes (f07746 is orange and f0cb46 is yellow) here.

You can also find the analogous colors to a given color at this link. Just replace the color hex code in the link with your color, and you can get matching shades and hues of other colors.

share|improve this answer
    
This is very nice but do you know how to colour the window boader buttons (close max min etc) –  mark kirby Apr 27 '13 at 13:37
    
also the progress bars did not change –  mark kirby Apr 27 '13 at 14:00
    
If you can add more details I will gladly accept this answer –  mark kirby Apr 27 '13 at 14:10
    
solution updated to include progress bar, and all the other buttons. –  bkd.online Apr 27 '13 at 17:50
    
Thanks thats great ;) –  mark kirby Apr 27 '13 at 21:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.