UNPKG

khroma

Version:

A collection of functions for manipulating CSS colors, inspired by SASS.

27 lines (13 loc) 240 B
/* IMPORT */ import Color from '~/color'; /* MAIN */ const isValid = ( color: string ): boolean => { try { Color.parse ( color ); return true; } catch { return false; } }; /* EXPORT */ export default isValid;