nextColorHsv method

HSVColor nextColorHsv({
  1. double? hue,
  2. double? saturation,
  3. double? value,
  4. double? alpha,
})

Generates a random HSVColor with uniformly distributed hue, saturation, and value values.

You can optionally specify some components of the generated HSVColor.

Implementation

HSVColor nextColorHsv({
  double? hue,
  double? saturation,
  double? value,
  double? alpha,
}) {
  final h = hue ?? nextDouble() * 360;
  final s = saturation ?? nextDouble();
  final v = value ?? nextDouble();
  final a = alpha ?? nextDouble();

  return HSVColor.fromAHSV(a, h, s, v);
}