SassColor.hsl constructor

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

Creates an HSL color.

Passing null to alpha is deprecated, and will change behavior in future versions of Dart Sass to represent a missing component instead of being equivalent to 1. Callers who want to create opaque colors should explicitly pass 1 or not pass alpha at all.

Throws a RangeError if saturation or lightness aren't between 0 and 100, or if alpha isn't between 0 and 1.

Implementation

SassColor.hsl(num hue, num saturation, num lightness, [num? alpha = 1])
    : this.hslInternal(hue, saturation, lightness, _handleNullAlpha(alpha));