import colorString from 'color-string' ; export const getCSSColorByString = ( color ) => { const cssColor = colorString . get ( color ) ; if ( cssColor == null ) { console . error ( `provided an invalid color string, '${ color }'` ) ; } return cssColor == null ? [ 0 , 0 , 0 ] : cssColor . value ; } ;