PColorRGB.fromHSV constructor

PColorRGB.fromHSV(
  1. double h,
  2. double s,
  3. double v, {
  4. double? alpha,
})

Implementation

factory PColorRGB.fromHSV(double h, double s, double v, {double? alpha}) {
  var rgb = hsvToRGB(h, s, v);
  if (alpha != null && alpha != 1.0) {
    return PColorRGBA(rgb.r, rgb.g, rgb.b, alpha);
  } else {
    return PColorRGB(rgb.r, rgb.g, rgb.b);
  }
}