nextColorHsl method
Generates a random HSLColor with uniformly distributed hue, saturation, and lightness values.
You can optionally specify some components of the generated HSLColor.
Implementation
HSLColor nextColorHsl({
double? hue,
double? saturation,
double? lightness,
double? alpha,
}) {
final h = hue ?? nextDouble() * 360;
final s = saturation ?? nextDouble();
final l = lightness ?? nextDouble();
final a = alpha ?? nextDouble();
return HSLColor.fromAHSL(a, h, s, l);
}