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.

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

1 Answer 1

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 this-i.stack.imgur.com/nO2fd.png...the 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

 
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.