toColor method

Color toColor()

Returns this HSL color in RGB.

Implementation

Color toColor() {
  final double chroma = (1.0 - (2.0 * lightness - 1.0).abs()) * saturation;
  final double secondary = chroma * (1.0 - (((hue / 60.0) % 2.0) - 1.0).abs());
  final double match = lightness - chroma / 2.0;

  return _colorFromHue(alpha, hue, chroma, secondary, match);
}