darkerShade method
- [double factor = 0.2]
Implementation
Color darkerShade([double factor = 0.2]) {
assert(factor >= 0 && factor <= 1, 'Factor must be between 0 and 1');
return Color.fromARGB(
alpha,
(red * (1 - factor)).round().clamp(0, 255),
(green * (1 - factor)).round().clamp(0, 255),
(blue * (1 - factor)).round().clamp(0, 255),
);
}