整理自:jscolor.js插件
this.styleElement.style.color = this.isLight() ? '#000' : '#FFF';
this.isLight = function () {
return (
0.213 * this.rgb[0] +
0.715 * this.rgb[1] +
0.072 * this.rgb[2] >
255 / 2
);
};