// ------------------------------------------------------------------ /// <summary> /// Creates from a given color. /// </summary> /// <param name="color">The color.</param> /// <returns></returns> public static RgbColor FromColor( Color color) { return(ColorConverting.ColorToRgb(color)); }
/// <summary> /// Returns the underlying .NET color. /// </summary> /// <returns></returns> public Color ToColor() { return(ColorConverting.RgbToColor(this)); }
/// <summary> /// Returns a HSL color. /// </summary> /// <returns></returns> public HslColor ToHslColor() { return(ColorConverting.RgbToHsl(this)); }
// ------------------------------------------------------------------ /// <summary> /// Creates from a given color. /// </summary> /// <param name="color">The color.</param> /// <returns></returns> public static HsbColor FromColor( Color color) { return(ColorConverting.ColorToRgb(color).ToHsbColor()); }
/// <summary> /// Returns a HSL color. /// </summary> /// <returns></returns> public HslColor ToHslColor() { return(ColorConverting.RgbToHsl(ToRgbColor())); }
/// <summary> /// Returns a RGB color. /// </summary> /// <returns></returns> public RgbColor ToRgbColor() { return(ColorConverting.HsbToRgb(this)); }
/// <summary> /// Returns the underlying .NET color. /// </summary> /// <returns></returns> public Color ToColor() { return(ColorConverting.HsbToRgb(this).ToColor()); }
// ------------------------------------------------------------------ /// <summary> /// Creates from a given color. /// </summary> /// <param name="color">The color.</param> /// <returns></returns> public static HslColor FromColor( Color color) { return(ColorConverting.RgbToHsl( ColorConverting.ColorToRgb(color))); }