Magic-wand tool (fuzzy selection) by color for Javascript