function hexToInt(hexColor) {
  if (hexColor.startsWith('#')) {
    return parseInt(hexColor.substring(1), 16);
  }

  return parseInt(hexColor, 16);
}
@description Converts HEX color to int.
@param {string} hexColor - Hex string between 0 and FFFFFF.
@returns {number} Int color.
@example
const int = hexToInt('0000FF');
console.log(int === 255);