/// <summary>
        /// Convert from HSL to RGB color space.
        /// </summary>
        ///
        /// <param name="hsl">Source color in <b>HSL</b> color space.</param>
        /// <param name="rgb">Destination color in <b>RGB</b> color space.</param>
        ///
        public static void HSL2RGB(HSL hsl, RGB rgb)
        {
            if (hsl.Saturation == 0)
            {
                // gray values
                rgb.Red = rgb.Green = rgb.Blue = (byte)(hsl.Luminance * 255);
            }
            else
            {
                double v1, v2;
                double hue = (double)hsl.Hue / 360;

                v2 = (hsl.Luminance < 0.5) ?
                     (hsl.Luminance * (1 + hsl.Saturation)) :
                     ((hsl.Luminance + hsl.Saturation) - (hsl.Luminance * hsl.Saturation));
                v1 = 2 * hsl.Luminance - v2;

                rgb.Red   = (byte)(255 * Hue_2_RGB(v1, v2, hue + (1.0 / 3)));
                rgb.Green = (byte)(255 * Hue_2_RGB(v1, v2, hue));
                rgb.Blue  = (byte)(255 * Hue_2_RGB(v1, v2, hue - (1.0 / 3)));
            }
        }
        public static System.Windows.Media.Color FromHSL(int h, double s, double l)
        {
            HSL hsl = new HSL(h, s, l);

            return(hsl.ToColor());
        }