withBlack method
⬛ With Black
Color.withBlack(int subtract)
// Darkens Color's RGB values by `subtract` (result >= 0)
Implementation
Color withBlack(int subtract) => Color.fromARGB(
alpha,
(red - subtract)._clamp,
(green - subtract)._clamp,
(blue - subtract)._clamp,
);