addHSLuv method

HSLuvColor addHSLuv(
  1. double h,
  2. double s,
  3. double l
)

Returns a copy of this color with hue, saturation and lightness being added. If Saturation or Lightness values is > 100, it will be limited to 100. If Saturation or Lightness values is < 0, it will be set to 100.

Implementation

HSLuvColor addHSLuv(double h, double s, double l) {
  return HSLuvColor.fromHSL(
    (hue + h) % 360,
    math.max(0, math.min(saturation + s, 100)),
    math.max(0, math.min(lightness + l, 100)),
  );
}