import{TinyColor as e}from"../../node_modules/.pnpm/@ctrl_tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/index.mjs";function t(e){return e>=0&&e<=255}function n(n,r){let{r:i,g:a,b:o,a:s}=new e(n).toRgb();if(s<1)return n;let{r:c,g:l,b:u}=new e(r).toRgb();for(let n=.01;n<=1;n+=.01){let r=Math.round((i-c*(1-n))/n),s=Math.round((a-l*(1-n))/n),d=Math.round((o-u*(1-n))/n);if(t(r)&&t(s)&&t(d))return new e({r,g:s,b:d,a:Math.round(n*100)/100}).toRgbString()}return new e({r:i,g:a,b:o,a:1}).toRgbString()}export{n as default};