liu
2026-09-03 a956b0ea73c9891a6e0e1325d093f6b63e3e8501
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();
}