0

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??

0

1 Answer 1

0

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.

11
  • What part of the above code makes the color go light? :o...curious..
    – Nirmik
    Jun 20, 2012 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. Jun 20, 2012 at 7:45
  • If i want to make it even lighter,i add value smaller than 70 or more than 70?
    – Nirmik
    Jun 20, 2012 at 9:30
  • increase additional_color to get lighter color(maximum value is 255).e.g. try with 125. Jun 20, 2012 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, 2012 at 16:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .