|
export const isValidColor = (color: string) => {
|
|
if (!color) return false;
|
|
if (
|
|
!color.startsWith('#') &&
|
|
!color.startsWith('rgb(') &&
|
|
!color.startsWith('hsl(') &&
|
|
!color.startsWith('hsv(')
|
|
) {
|
|
return false;
|
|
}
|
|
// TODO: check color values
|
|
return true;
|
|
};
|