tonalFrom static method

Color tonalFrom(
  1. Color base,
  2. bool isDark
)

Soft tonal fill derived from any base color.

Implementation

static Color tonalFrom(Color base, bool isDark) {
  final hsl = HSLColor.fromColor(base);
  return isDark
      ? hsl.withSaturation(0.45).withLightness(0.16).toColor()
      : hsl.withSaturation(0.55).withLightness(0.94).toColor();
}