function rgbArrayToHex(value) {
  const color = value.slice(0, 3).map((x) => (x | (1 << 8)).toString(16).slice(1));

  color.unshift("#");
  return color.join("");
}
Packs rgb array into hex color format
@param {string} color