icon_color_analyzer is a tool to determine the main color of an icon then preview the matched background color drawing with it. It's a demo for our UI team. I open it to others may some code could help you as in the process I've been taking a lot of time to look for reference.