hueSaturation function

RGBA hueSaturation (RGBA color, num adj)

Implementation

RGBA hueSaturation(RGBA color, num adj) {
  var hsv = imageUtils.rgbToHsv(color.red, color.green, color.blue);
  hsv[1] *= adj;
  var rgb = imageUtils.hsvToRgb(hsv[0], hsv[1], hsv[2]);
  return new RGBA(
    red: clampPixel(rgb[0]),
    green: clampPixel(rgb[1]),
    blue: clampPixel(rgb[2]),
    alpha: color.alpha,
  );
}