lighten static method
Lightens a MacosColor by a percent
amount (100 = white) without
changing the tint of the color
Implementation
static MacosColor lighten(MacosColor c, [int percent = 10]) {
assert(1 <= percent && percent <= 100);
var p = percent / 100;
return MacosColor.fromARGB(
c.alpha,
c.red + ((255 - c.red) * p).round(),
c.green + ((255 - c.green) * p).round(),
c.blue + ((255 - c.blue) * p).round(),
);
}