function hexToRgb(hex) {
  const bigint = parseInt(hex.replace('#', ''), 16);
  const r = (bigint >> 16) & 255;
  const g = (bigint >> 8) & 255;
  const b = bigint & 255;
  return [r, g, b];
}
Converts a hex color string to an RGB array.
@param {string} hex - The hex color string.
@returns {number[]} The RGB array.