toRgb()

Type : public method

Support : 0.6

Return : String | Object

Methods

  • toRgb( color, parse ) : StringObjectver 0.6~

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

Example

//Return Type : String
var strColor = $B.color.toRgb( '#FFFFFF' ); //rgb(255, 255, 255)

//Return Type : Object
var objColor = $B.color.toRgb( '#FFFFFF', true ); //{ r: 255, g: 255, b: 255 }