function rgbToInt(rgb) {
  const [red, green, blue] = rgb;

  // eslint-disable-next-line no-bitwise
  return (red << 16) | (green << 8) | blue;
}
@description Converts RGB array color to int.
@param {Array} rgb - [red, green, blue ] array.
@returns {number} IntColor - Color between 0 and 16777215.
@example
const int = rgbToInt([ 255, 0, 0 ]);
console.log(hex === 255);