/** * 颜色工具类 * @author zhongming */ export default class ColorUtil { private static defaultThreshold; /** * 将十六进制颜色代码转为RGB * @param colorCode 十六进制颜色代码 */ static convertHexadecimalToRGB(colorCode: string): Array | null; /** * 将RGB转为十六进制颜色代码 * @param rgb rgb颜色 */ static convertRGBToHexadecimal(rgb: Array): string | null; /** * 判断颜色是否为深色 * @param colorCode 颜色 * @param threshold 阈值 */ static isDark(colorCode: any, threshold?: number): boolean | null; static isDark1(r: number, g: number, b: number, threshold: number): boolean; }