var s=function(e,t){if(!(typeof window>"u")&&!(typeof document>"u")){var r=t??document.body;return window.getComputedStyle(r,null).getPropertyValue(e).replace(/^\s/,"")}};var f=function(e){if(typeof e>"u")throw new TypeError("Hex color is not defined");if(e==="transparent")return"#00000000";var t=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);if(!t)throw new Error("".concat(e," is not a valid rgb color"));var r="0".concat(parseInt(t[1],10).toString(16)),a="0".concat(parseInt(t[2],10).toString(16)),n="0".concat(parseInt(t[3],10).toString(16));return"#".concat(r.slice(-2)).concat(a.slice(-2)).concat(n.slice(-2))};var i=function(e,t){if(t===void 0&&(t=100),typeof e>"u")throw new TypeError("Hex color is not defined");var r=e.match(/^#(?:[0-9a-f]{3}){1,2}$/i);if(!r)throw new Error("".concat(e," is not a valid hex color"));var a,n,o;return e.length===7?(a=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16)):(a=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),o=parseInt(e.slice(3,5),16)),"rgba(".concat(a,", ").concat(n,", ").concat(o,", ").concat(t/100,")")};export{s as a,i as b,f as c};
