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.

The icons on the Unity launcher are square and contain the icon image and have a coloured background. The icons have different colours as their backgrounds (see screenshot). How does Unity decide what colour this should be?

Unity Launcher

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Looks like it's using the average (RGB) of the colors of the icon.

Take a look at the upstream code for details.

share|improve this answer
    
So, what happens if the icon is monochrome? ;) –  JanC Nov 12 '10 at 5:52
    
Well, the average of one white pixel and one black pixel is 50% neutral grey (127, 127, 127). ;-) And transparent pixels seem to count as black. –  htorque Nov 12 '10 at 7:16

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.