
/* IMPORT */

import Color from '~/color';

/* MAIN */

const isValid = ( color: string ): boolean => {

  try {

    Color.parse ( color );

    return true;

  } catch {

    return false;

  }

};

/* EXPORT */

export default isValid;
