chinacolor
Version:
中国色,颜色名转十六进制
14 lines (13 loc) • 336 B
JavaScript
import colorHandle from "./core/fn";
import colors from "./core/colors";
class Color extends colorHandle {
constructor() {
super();
this.children = colors;
}
randomChinaColor() {
let indx = Math.floor(Math.random() * this.children.length);
return this.children[indx].hex;
}
}
export default Color;