import {e,a,h,g,f,i,j,c}from'../chunk-HFDTK2ZP.mjs';import'../chunk-FXCFKFXK.mjs';import'../chunk-OD65R6MQ.mjs';import {b,a as a$1}from'../chunk-JFPP44S3.mjs';var $=(n,m,z)=>{n.prototype.toLab=function(){let{l:r,a,b:o,alpha:t}=e(this._rawRgb());return {l:b(r,2),a:b(a,2)||0,b:b(o,2)||0,alpha:t,colorSpace:"lab"}},n.prototype.toLabString=function(){let{l:r,a,b:o,alpha:t}=this.toLab();return t<1?`lab(${r}% ${a} ${o} / ${t})`:`lab(${r}% ${a} ${o})`},n.prototype.toXyz=function(){let{x:r,y:a$1,z:o,alpha:t}=a(this._rawRgb());return {x:b(r,2),y:b(a$1,2),z:b(o,2),alpha:t}},n.prototype.toXyzString=function(){let{x:r,y:a,z:o,alpha:t}=this.toXyz();return t<1?`color(xyz-d65 ${r} ${a} ${o} / ${t})`:`color(xyz-d65 ${r} ${a} ${o})`},n.prototype.mixLab=function(r,a=.5){let o=e(this._rawRgb()),t=e(new n(r)._rawRgb()),l=a$1(a,0,1);return new n(h({l:o.l*(1-l)+t.l*l,a:o.a*(1-l)+t.a*l,b:o.b*(1-l)+t.b*l,alpha:b(o.alpha*(1-l)+t.alpha*l,3),colorSpace:"lab"}))},n.prototype.delta=function(r="#fff"){return b(g(f(this._rawRgb()),f(new n(r)._rawRgb()))/100,3)},m.push(i,j,c),z.push([i,"lab"],[j,"lab"],[c,"xyz"]);},w=$;export{w as default};//# sourceMappingURL=lab.mjs.map
//# sourceMappingURL=lab.mjs.map