@wuxh/utils
    Preparing search index...

    Function toHSLObject

    • hsl()颜色字符串转换为具有每种颜色值的对象

      Parameters

      • hslStr: string

        hsl 字符串 e.g. hsl(50, 10%, 10%)

      Returns HSLObject

      具有每种颜色值的对象

      toHSLObject('hsl(50, 10%, 10%)'); // { hue: 50, saturation: 10, lightness: 10 }