SassColor.hsl constructor

SassColor.hsl(
  1. num? hue,
  2. num? saturation,
  3. num? lightness, [
  4. num? alpha = 1,
])

Creates a color in ColorSpace.hsl.

If null is passed for alpha, that indicates that it's a missing component. In most cases, this is equivalent to the color being transparent.

Throws a RangeError if alpha isn't between 0 and 1.

Implementation

factory SassColor.hsl(num? hue, num? saturation, num? lightness,
        [num? alpha = 1]) =>
    SassColor.forSpaceInternal(ColorSpace.hsl, hue?.toDouble(),
        saturation?.toDouble(), lightness?.toDouble(), alpha?.toDouble());