HslColor constructor

const HslColor(
  1. num hue,
  2. num saturation,
  3. num lightness, [
  4. num alpha = 1,
])

Construct a Color object with given HSV and alpha (i.e., opacity) values. *

    • hue should be a number between 0 (inclusive) and 360 (exclusive).
    • saturation and lightness should be numbers between 0 (inclusive) and
  • 1 (inclusive).
    • alpha should be a number between 0 (inclusive) and 1 (inclusive).
  • Default: 1

Implementation

const HslColor(num hue, num saturation, num lightness, [num alpha = 1]) :
this.hue = hue, this.saturation = saturation, this.lightness = lightness, this.alpha = alpha;