replaced raphael's rgb2hsb with tinycolor's toHsv