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?
Ubuntu – How does Unity decide the icon background colours
10.10unity
Best Answer
Looks like it's using the average (RGB) of the colors of the icon.
Take a look at the upstream code for details.