方法一(随机RGB颜色值)#####
//颜色对象
function getRandomColor(){
this.r = Math.floor(Math.random()*255);
this.g = Math.floor(Math.random()*255);
this.b = Math.floor(Math.random()*255);
this.color = 'rgba('+ this.r +','+ this.g +','+ this.b +',0.8)';
}
//颜色对象
function getRa