Skip to main content
All docs
V26.1
  • HslColor Members

    A color in the HSL (hue, saturation, lightness) color space.

    Constructors

    Name Description
    HslColor(Int32, Int32, Int32) Initializes a new instance of the HslColor class with specified settings.
    HslColor(Single, Single, Single) Initializes a new instance of the HslColor class with specified settings.

    Properties

    Name Description
    DefaultValue static Returns the default HSL color.
    FloatHue Gets or sets the hue component of the color as a float value between -1 and 1.
    FloatLightness Gets or sets the lightness component of the color as a float value between -1 and 1.
    FloatSaturation Gets or sets the saturation component of the color as a float value between -1 and 1.
    Hue Gets or sets the hue component of the color as an integer value between 0 and 360.
    Lightness Gets or sets the lightness component of the color as an integer value between 0 and 100.
    Saturation Gets or sets the saturation component of the color as an integer value between 0 and 100.

    Methods

    Name Description
    ApplyHue(Int32) Applies the specified hue value to the color.
    ApplyHueMod(Int32) Modulates the color’s hue channel.
    ApplyHueOffset(Int32) Applies a hue offset to the current color.
    ApplyLightness(Int32) Applies a lightness value to the current color.
    ApplyLightnessMod(Int32) Applies a lightness modification to the current color.
    ApplyLightnessOffset(Int32) Applies a lightness offset to the current color.
    ApplySaturation(Int32) Applies a saturation value to the current color.
    ApplySaturationMod(Int32) Applies a saturation modification to the current color.
    ApplySaturationOffset(Int32) Applies a saturation offset to the current color.
    ApplyTint(Double) Applies a tint to the current color.
    Equals(HslColor) Indicates whether the current HslColor object is equal to another HslColor object.
    Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
    Equals(Object) Indicates whether the current HslColor object is equal to another object.
    FromRgb(Color) static Converts a Color structure to an HslColor structure.
    GetComplementColor() Returns the complementary color of the current color.
    GetHashCode() Returns a number that identifies the object instance.
    GetType() Gets the Type of the current instance. Inherited from Object.
    ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
    ToRgb() Converts the current HslColor structure to a Color structure.
    ToString() Returns the fully qualified type name of this instance. Inherited from ValueType.

    Operators

    Name Description
    Equality(HslColor, HslColor) static Determines whether two HslColor structures are equal.
    Inequality(HslColor, HslColor) static Determines whether two HslColor structures are not equal.
    See Also