updated functionality and added tinycolor dependency