RayHsl.fromComponents constructor

RayHsl.fromComponents(
  1. num hue,
  2. num saturation,
  3. num lightness, [
  4. num opacity = 1.0,
])

Creates a RayHsl from individual HSLO component values.

hue in degrees (0-360), saturation, lightness, and opacity in range 0-1.

Implementation

factory RayHsl.fromComponents(num hue, num saturation, num lightness,
        [num opacity = 1.0]) =>
    RayHsl(
      hue: hue.toDouble(),
      saturation: saturation.toDouble(),
      lightness: lightness.toDouble(),
      opacity: opacity.toDouble(),
    );