withLightness method

Colour withLightness(
  1. double lightness
)

A copy of this colour with its HSL lightness changed to lightness (0.0 to 1.0).

Implementation

Colour withLightness(double lightness) {
  return Colour.fromHSLColour(
    HSLColour.fromAHSL(a, hue, saturation, lightness),
  );
}