File size: 178 Bytes
1e92f2d |
1 2 3 4 5 |
import { colord } from 'colord';
export function getTextColorFromBackground( backgroundColor: string ): string {
return colord( backgroundColor ).isLight() ? '#000' : '#fff';
}
|
1e92f2d |
1 2 3 4 5 |
import { colord } from 'colord';
export function getTextColorFromBackground( backgroundColor: string ): string {
return colord( backgroundColor ).isLight() ? '#000' : '#fff';
}
|