var hexToRgb = function (hex) {
    var _a;
    return ((_a = hex
        .replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (_, r, g, b) { return '#' + r + r + g + g + b + b; })
        .substring(1)
        .match(/.{2}/g)) === null || _a === void 0 ? void 0 : _a.map(function (x) { return parseInt(x, 16); })) || [];
};

export { hexToRgb };
//# sourceMappingURL=hexToRgb.js.map
