rgb(123,25,62) 转:
{"b":62,"g":25,"r":123,"rgba":rgb(123,25,62)
}
Vue.prototype.colorRgbZuan = function(color){ //debugger let regexKuohao = /\(([^()]+)\)/g; // () 小括号 let jiequColor = color.match(regexKuohao) let jiequColorArray = jiequColor[0].substr(1).substr(0,jiequColor[0].length-2).split(",") let ColorP = {"b":jiequColorArray[2],"g":jiequColorArray[1],"r":jiequColorArray[0],"rgba":color} return ColorP }