Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
Raw History Blame Contribute Delete
178 Bytes
import { colord } from 'colord';
export function getTextColorFromBackground( backgroundColor: string ): string {
return colord( backgroundColor ).isLight() ? '#000' : '#fff';
}