Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just started using an amazing script that makes the default "Ambiance" theme use that selected color.

More details can be found Here

I find this really amazing. But with my wallpaper being as shown below, the selection color, progress-bars color as after running the script are too dark (that can be seen in the following screenshot).

enter image description here

I've learnt that what is done is the average color from the wallpaper is selected and then its tint is used (which is always a darker tint).

So can I make this algorithm or whatever select a lighter tint of the average color??

Or can it be made to select the lightest color instead of the average color from the wallpaper??

share|improve this question

Put this code in get_color(self) function,

    additional_color = 70
    rgb_red = int(rgb_set[0]) + additional_color
    rgb_green = int(rgb_set[1]) + additional_color
    rgb_blue = int(rgb_set[2]) + additional_color
    if (rgb_red > 255): rgb_red = 255
    if (rgb_green > 255): rgb_green = 255
    if (rgb_blue > 255): rgb_blue = 255

    color_hex = '%02x%02x%02x' % (rgb_red, rgb_green, rgb_blue)

Before :

enter image description here

After :

enter image description here

You can change additional_color if you want ligher/darker color.

Here is full script.

share|improve this answer
What part of the above code makes the color go light? :o...curious.. – Nirmik Jun 20 '12 at 7:26
How do you make any color lighter? by adding white color,right? here color_hex is hexadecimal value generated from RGB color. How to add white color in RGB? add same value in Red,Green,Blue. I've added 70 points in RGB values. – virpara Jun 20 '12 at 7:45
If i want to make it even lighter,i add value smaller than 70 or more than 70? – Nirmik Jun 20 '12 at 9:30
increase additional_color to get lighter color(maximum value is 255).e.g. try with 125. – virpara Jun 20 '12 at 10:03
well its not working for somereason with me :(....with my default background being selected color always used to be #6e8703...and even after trying multiple values off additional color,its still the same... :( – Nirmik Jun 20 '12 at 16:54

Your Answer


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.