code: function rgbaToHex(color) {
      color = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
  
      var hex = (color && color.length === 4) ? "#" +
      ("0" + parseInt(color[1],10).toString(16)).slice(-2) +
      ("0" + parseInt(color[2],10).toString(16)).slice(-2) +
      ("0" + parseInt(color[3],10).toString(16)).slice(-2) : '';
  
      return hex.toUpperCase();
    }
docs: Converts rgba value to hex string
  @param {string} color
  @returns {string}