import r from"chroma-js";import n from"validate-color";var t=function(r){for(var n=r;n;){var t=getComputedStyle(n).backgroundColor;if(t&&"transparent"!==t&&"rgba(0, 0, 0, 0)"!==t)return t;n=n.parentElement}},a=function(n,t){if(!t)return"#fff";var a=r(t),o=Number(r(a).alpha());return 0===o||r.mix(n||"#414141",a.alpha(1),o).luminance()>.7?"#00000060":"#fff"},o=function(r){var t=null==r?void 0:r.trim();return t&&n(t)?t:null};export{t as findParentBackground,a as getButtonStrokeColor,o as getValidColor};
