From http://menugget.blogspot.in/2013/01/choosing-colors-visually-with-getcolors.html#more