Simplified algorithm to just detect the most used colors. Also increased scale size. Updated demo.