This commit is contained in:
dap
2024-10-21 20:29:43 +08:00
15 changed files with 41 additions and 21 deletions

View File

@@ -0,0 +1,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();
}

View File

@@ -1,2 +1,3 @@
export * from './color';
export * from './convert';
export * from './generator';