darkenHsl function

List<num> darkenHsl (
  1. num amount,
  2. List<num> color
)

returns a darkened hsl array. amount is a value in the range [0, 1]

Implementation

List<num> darkenHsl(num amount, List<num> color) {
  var h = color[0];
  var s = color[1];
  var l = color[2];
  return [h, s, _clampNorm(l - (l * amount))];
}