6

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

1 Answer 1

5

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

Take a look at the upstream code for details.

2
  • So, what happens if the icon is monochrome? ;)
    – JanC
    Nov 12, 2010 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, 2010 at 7:16

You must log in to answer this question.

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