Represents an ARGB (alpha, red, green, blue) color.

Hierarchy (view full)

Accessors

Methods

  • Casts this object to the specified type. Throws error on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns T1

  • Determines whether the specified object is equal to the current object.

    Parameters

    • obj: any

      The object to compare with the current object.

    Returns boolean

    true if the specified object is equal to the current object; otherwise, false.

  • Gets the hue-saturation-lightness (HSL) lightness value for this System.Drawing.Color structure.

    Returns number

    The lightness of this System.Drawing.Color. The lightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.

  • Serves as the default hash function.

    Returns number

    A hash code for the current object.

  • Gets the hue-saturation-lightness (HSL) hue value, in degrees, for this System.Drawing.Color structure.

    Returns number

    The hue, in degrees, of this System.Drawing.Color. The hue is measured in degrees, ranging from 0.0 through 360.0, in HSL color space.

  • Gets the hue-saturation-lightness (HSL) saturation value for this System.Drawing.Color structure.

    Returns number

    The saturation of this System.Drawing.Color. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated.

  • Returns a string that represents the current object.

    Returns string

    A string that represents the current object.

  • Casts this object to the specified type. Returns null on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns null | T1

  • Determines whether the specified object instances are considered equal.

    Parameters

    • objA: any

      The first object to compare.

    • objB: any

      The second object to compare.

    Returns boolean

    true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.

  • Creates a System.Drawing.Color structure from the specified 8-bit color values (red, green, and blue). The alpha value is implicitly 255 (fully opaque). Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits.

    Parameters

    Returns Color

    The System.Drawing.Color that this method creates.

  • Creates a System.Drawing.Color structure from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits.

    Parameters

    • alpha: number | Int32

      The alpha component. Valid values are 0 through 255.

    • red: number | Int32

      The red component. Valid values are 0 through 255.

    • green: number | Int32

      The green component. Valid values are 0 through 255.

    • blue: number | Int32

      The blue component. Valid values are 0 through 255.

    Returns Color

    The System.Drawing.Color that this method creates.