code: function hexToObject(hex) {
    // Convert #abc to #aabbcc
    const color = hex.length === 4 ? `#${ hex[1] }${ hex[1] }${ hex[2] }${ hex[2] }${ hex[3] }${ hex[3] }` : hex;
    const result = HEX_REGEX.exec(color);
  
    // Safety check, if color is in the wrong format
    if (!result) {
      console.warn(`Plx, ERROR: hex color is not in the right format: "${ hex }"`); // eslint-disable-line no-console
      return null;
    }
  
    // All color functions are returning { r, g, b, a } object
    return {
      r: parseInt(result[1], 16),
      g: parseInt(result[2], 16),
      b: parseInt(result[3], 16),
      a: 1,
    };
  }
docs: Convers color in hex format into object { r, g, b, a }