HSL

struct HSL : Hashable

The HSL (hue, saturation, lightness) components of a color.

  • hue

    The hue component of the color, in the range [0, 360°].

    Declaration

    Swift

    public var hue: CGFloat
  • The saturation component of the color, in the range [0, 100%].

    Declaration

    Swift

    public var saturation: CGFloat
  • The lightness component of the color, in the range [0, 100%].

    Declaration

    Swift

    public var lightness: CGFloat
  • Initializes the HSL (hue, saturation, lightness) components of a color.

    Declaration

    Swift

    public init(hue: CGFloat, saturation: CGFloat, lightness: CGFloat)

    Parameters

    hue

    The hue component of the color, in the range [0, 360°].

    saturation

    The saturation component of the color, in the range [0, 100%].

    lightness

    The lightness component of the color, in the range [0, 100%].