withLightness method

HSLuvColor withLightness(
  1. double lightness
)

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

Implementation

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