(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.hexToRgb = void 0;
    var hexToRgb = function (c) {
        c.toUpperCase();
        var result = /^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(c);
        return result
            ? {
                r: parseInt(result[1], 16),
                g: parseInt(result[2], 16),
                b: parseInt(result[3], 16)
            }
            : null;
    };
    exports.hexToRgb = hexToRgb;
});
