withSaturation method

HSLuvColor withSaturation(
  1. double saturation
)

Returns a copy of this color with the saturation parameter replaced with the given value.

Implementation

HSLuvColor withSaturation(double saturation) {
  return HSLuvColor.fromHSL(hue, math.min(saturation, 100), lightness);
}