import r from"../../../../tinycolor2/tinycolor.js";import{isEmptyObject as t}from"../../../utils/dist/esm/assertion.js";import{memoizedGet as n}from"../../../utils/dist/esm/object.js";var o=(t,o,a)=>{var e=n(t,"colors."+o,o);return r(e).isValid()?e:a},a=t=>n=>{var a=o(n,t);return r(a).isDark()?"dark":"light"},e=r=>t=>"dark"===a(r)(t),i=(t,n)=>a=>{var e=o(a,t);return r(e).setAlpha(n).toRgbString()};function s(r,t){return void 0===r&&(r="1rem"),void 0===t&&(t="rgba(255, 255, 255, 0.15)"),{backgroundImage:"linear-gradient(\n    45deg,\n    "+t+" 25%,\n    transparent 25%,\n    transparent 50%,\n    "+t+" 50%,\n    "+t+" 75%,\n    transparent 75%,\n    transparent\n  )",backgroundSize:r+" "+r}}function g(n){var o,a=r.random().toHexString();return!n||t(n)?a:n.string&&n.colors?function(r,t){var n=0;if(0===r.length)return t[0];for(var o=0;o<r.length;o+=1)n=r.charCodeAt(o)+((n<<5)-n),n&=n;return n=(n%t.length+t.length)%t.length,t[n]}(n.string,n.colors):n.string&&!n.colors?function(r){var t=0;if(0===r.length)return t.toString();for(var n=0;n<r.length;n+=1)t=r.charCodeAt(n)+((t<<5)-t),t&=t;for(var o="#",a=0;a<3;a+=1){o+=("00"+(t>>8*a&255).toString(16)).substr(-2)}return o}(n.string):n.colors&&!n.string?(o=n.colors)[Math.floor(Math.random()*o.length)]:a}export{s as generateStripe,o as getColor,e as isDark,g as randomColor,a as tone,i as transparentize};
//# sourceMappingURL=color.js.map
