3 天以前 46b2ae1c889e181ebe186de3758fc09804696029
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();
}