lightenRgb function
returns a lightened rgb array. amount
is a value in the range [0, 1]
Implementation
List<num> lightenRgb(num amount, List<num> rgb) => rgb
.map((c) => [
[0, c + (c * amount)].reduce(math.max),
255
].reduce(math.min).round())
.toList();