code: public static GenericColor valueOf(Hue hue, Saturation saturation, Lightness lightness, Alpha alpha) {
  
      Objects.requireNonNull(hue, "hue");
      Objects.requireNonNull(saturation, "saturation");
      Objects.requireNonNull(lightness, "lightness");
      Objects.requireNonNull(alpha, "alpha");
      GenericColor genericColor = new GenericColor();
      genericColor.hue = hue;
      genericColor.saturationHsl = saturation;
      genericColor.lightness = lightness;
      genericColor.alpha = alpha;
      double l = lightness.getValueAsFactor();
      double chroma;
      if (l >= 0.5) {
        chroma = saturation.getValueAsFactor() * (2 - 2 * l);
      } else {
        chroma = saturation.getValueAsFactor() * 2 * l;
      }
      double m = l - (chroma / 2);
      double saturationHsb;
      double b = chroma + m;
      genericColor.brightness = new Brightness(b);
      if (l == 0) {
        saturationHsb = 0;
      } else {
        saturationHsb = chroma / b;
      }
      genericColor.saturationHsb = new Saturation(saturationHsb);
      calculateRgb(genericColor, hue, m, chroma);
      return genericColor;
    }
docs: Creates a {@link GenericColor} from the given {@link Segment}s of {@link ColorModel#HSL}.
  
  @param hue is the {@link Hue} part.
  @param saturation is the {@link Saturation} part.
  @param lightness is the {@link Lightness} part.
  @param alpha is the {@link Alpha} value.
  @return the {@link GenericColor}.