shade method

Color shade(
  1. double value
)

Implementation

Color shade(double value) {
  if (value <= 0 || value >= 1 || use == Colors.transparent) return use;
  final hsl = HSLColor.fromColor(use);
  return hsl
      .withLightness((hsl.lightness - (value * 0.5)).clamp(0.0, 1.0))
      .toColor();
}