average method
Makes the current color more similar to the given color
, by the given value
,
from 0
(no change) to 1
(equal to color
).
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 average(Color color, [double value = 0.5]) => Color.lerp(this, color, _limit(value))!;