darker method
Makes the color darker (more black), by the given value
, from 0
(no change) to 1
(black).
If value
is not provided, it will be 0.5 (50% change).
If value
is less than 0, it's 0. If more than 1, it's 1.
Doesn't change the opacity.
See also: ChangeColors
Implementation
Color darker([double value = 0.5]) =>
Color.lerp(this, Colors.black, _limit(value))!.withAlpha(alpha);