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, saturation.clamp(0.0, 100.0), lightness);
}