Table of Contents

Class ColorHSL

Namespace
ImageMagick
Assembly
Magick.NET-Q16-AnyCPU.dll

Class that represents a HSL color.

public sealed class ColorHSL : ColorBase, IEquatable<ColorBase?>, IComparable<ColorBase?>
Inheritance
ColorHSL
Implements
Inherited Members

Constructors

ColorHSL(double, double, double)

Initializes a new instance of the ColorHSL class.

public ColorHSL(double hue, double saturation, double lightness)

Parameters

hue double

Hue component value of this color.

saturation double

Saturation component value of this color.

lightness double

Lightness component value of this color.

Properties

Hue

Gets or sets the hue component value of this color.

public double Hue { get; set; }

Property Value

double

Lightness

Gets or sets the lightness component value of this color.

public double Lightness { get; set; }

Property Value

double

Saturation

Gets or sets the saturation component value of this color.

public double Saturation { get; set; }

Property Value

double

Methods

FromMagickColor(IMagickColor<ushort>)

Converts the specified ImageMagick.IMagickColor<> to an instance of this type.

public static ColorHSL? FromMagickColor(IMagickColor<ushort> color)

Parameters

color IMagickColor<ushort>

The color to use.

Returns

ColorHSL

A ColorHSL instance.

UpdateColor()

Updates the color value in an inherited class.

protected override void UpdateColor()

Operators

explicit operator ColorHSL?(MagickColor)

Converts the specified MagickColor to an instance of this type.

public static explicit operator ColorHSL?(MagickColor color)

Parameters

color MagickColor

The color to use.

Returns

ColorHSL

A ColorHSL instance.