returns a darkened hex string. amount is a value in the range [0, 1]
amount
[0, 1]
String darkenHex(num amount, String hex) { var rgb = hex2rgb(hex); var ligthen = darkenRgb(amount, rgb); return rgb2hex(ligthen); }