Color.hslaRaw constructor

Color.hslaRaw(
  1. num hue,
  2. num saturation,
  3. num lightness, [
  4. num? alpha,
])

The hslaRaw takes three values. The hue degree on the color wheel; '0' is the least and '1' is the greatest. The value '0' or '1' is red, the ratio of 120/360 is green, and the ratio of 240/360 is blue. Numbers in between reflect different shades. The saturation is a percentage; '0' is the least and '1' is the greatest. The value of '1' is equivalent to 100% (full colour). The lightness is a percentage; '0' is the least and '1' is the greatest. The value of '0' is dark (black), the value of '1' is light (white), and the value of '.50' is a medium lightness.

The fourth optional parameter is: alpha level of translucency range of values is 0..1, zero is a completely transparent foreground and 1 is a completely opaque foreground.

Implementation

Color.hslaRaw(num hue, num saturation, num lightness, [num? alpha])
    : _argb = Hsla(
              Color._clamp(hue, 0, 1),
              Color._clamp(saturation, 0, 1),
              Color._clamp(lightness, 0, 1),
              alpha != null ? Color._clamp(alpha, 0, 1) : alpha)
          .toHexArgbString();