darkenHex function

String darkenHex (
  1. num amount,
  2. String hex
)

returns a darkened hex string. amount is a value in the range [0, 1]

Implementation

String darkenHex(num amount, String hex) {
  var rgb = hex2rgb(hex);
  var ligthen = darkenRgb(amount, rgb);

  return rgb2hex(ligthen);
}