liu
2026-09-30 b1e27feae0b951218fd2f0b0561f9be4c8b67771
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();
}