toHsl()

Type : public method

Support : 1.0

Return : String | Object

Methods

  • toHsl( color, parse ) : StringObjectver 1.0~

    • color : String
      Color문자열 ("hex", "rgb", "rgba", "keyword", "hsl", "hsla")
    • parse : Boolean
      반환값을 Object{h, s, l}로 받을것인지 설정, (기본값 false)

Example

//Return Type : String
var strColor = $B.color.toHsla( '#FFFFFF' ); //hsl(0, 0%, 100%)

//Return Type : Object
var objColor = $B.color.toHsla( '#FFFFFF', true ); //{ h: 0, s: 0%, l: 100% }