function hex(colStr) {
  const [r, g, b] = (rHex.exec(colStr) || rHexShort.exec(colStr) || [])
    .slice(1)
    .map((v) => parseInt(v.length === 1 ? v + v : v, 16));

  return new RgbaColor(r, g, b, 1);
}
/**
 * Instanciate a new color object
 * @ignore
 * @param { String } colStr HEX representation of a Color.
 * Supports HEX defintion at {@link https://www.w3.org/TR/css3-color/#svg-color}
 * @return { RgbaColor } Color instance
 * @example
 * hex( "#fff" );
 * hex( "#ffffff" );
 */
Instanciate a new color object
@ignore
@param { String } colStr HEX representation of a Color.
Instanciate a new color object @ignore @param { String } colStr HEX representation of a Color .
function hex(colStr) {
  const [r, g, b] = (rHex.exec(colStr) || rHexShort.exec(colStr) || [])
    .slice(1)
    .map((v) => parseInt(v.length === 1 ? v + v : v, 16));
  return new RgbaColor(r, g, b, 1);
}
function hex ( colStr ) { const [ r , g , b ] = ( rHex . exec ( colStr ) || rHexShort . exec ( colStr ) || [ ] ) . slice ( 1 ) . map ( ( v ) => parseInt ( v . length === 1 ? v + v : v , 16 ) ) ; return new RgbaColor ( r , g , b , 1 ) ; }
Instanciate a new color object
 @ignore
 @param { String } colStr HEX representation of a Color.
Instanciate a new color object @ignore @param { String } colStr HEX representation of a Color .