darken static method
Converts the given color as dark as the given percent and return it.
Implementation
static Color darken(Color color, double percent) {
return Color.fromARGB(
color.alpha,
(color.red * (1 - percent)).round(),
(color.green * (1 - percent)).round(),
(color.blue * (1 - percent)).round()
);
}