text: "use strict";
  
  Object.defineProperty(exports, "__esModule", {
    value: true,
  });
  exports.resolveColor = void 0;
  
  const types_1 = require("../types");
  
  function resolveColor(color) {
    if (color > 0 && color < 0xffffff) {
      return +color;
    }
  
    if (typeof color === "string" && color.includes("#")) {
      return parseInt(color.toString().replace("#", ""), 16);
    }
  
    if (Array.isArray(color)) {
      return (color[0] << 16) + (color[1] << 8) + color[2];
    }
  
    const value = types_1.ColorsHex[color];
  
    if (value) {
      return value;
    }
  
    return -1;
  }
  
  exports.resolveColor = resolveColor;
  