HslColor constructor
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
andlightness
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;