gaoluyang
9 天以前 25bec713b204dc5e5792982b2ef6f1ee488aed20
1
2
3
4
5
6
7
8
9
import { TinyColor } from '@ctrl/tinycolor';
 
export function isDarkColor(color: string) {
  return new TinyColor(color).isDark();
}
 
export function isLightColor(color: string) {
  return new TinyColor(color).isLight();
}