'use strict';var chunkPI5KJ3ZM_cjs=require('../chunk-PI5KJ3ZM.cjs');require('../chunk-INDSIUQQ.cjs'),require('../chunk-3V4MONNR.cjs');var chunkYISEJCI6_cjs=require('../chunk-YISEJCI6.cjs');var d=(b,f,x)=>{b.prototype.toLab=function(t=2){let{l:a,a:r,b:n,alpha:o}=chunkPI5KJ3ZM_cjs.m(this._rawRgb());return {l:chunkYISEJCI6_cjs.b(a,t),a:chunkYISEJCI6_cjs.b(r,t)||0,b:chunkYISEJCI6_cjs.b(n,t)||0,alpha:o,colorSpace:"lab"}},b.prototype.toLabString=function(t=2){let{l:a,a:r,b:n,alpha:o}=this.toLab(t);return o<1?`lab(${a} ${r} ${n} / ${o})`:`lab(${a} ${r} ${n})`},b.prototype.toXyz=function(t=2){let{x:a,y:r,z:n,alpha:o}=chunkPI5KJ3ZM_cjs.c(this._rawRgb());return {x:chunkYISEJCI6_cjs.b(a,t),y:chunkYISEJCI6_cjs.b(r,t),z:chunkYISEJCI6_cjs.b(n,t),alpha:o}},b.prototype.toXyzString=function(t=2){let{x:a,y:r,z:n,alpha:o}=this.toXyz(t);return o<1?`color(xyz-d50 ${a} ${r} ${n} / ${o})`:`color(xyz-d50 ${a} ${r} ${n})`},b.prototype.toXyzD65=function(t=2){let{x:a,y:r,z:n,alpha:o}=chunkPI5KJ3ZM_cjs.a(this._rawRgb());return {x:chunkYISEJCI6_cjs.b(a,t),y:chunkYISEJCI6_cjs.b(r,t),z:chunkYISEJCI6_cjs.b(n,t),alpha:o,colorSpace:"xyz-d65"}},b.prototype.toXyzD65String=function(t=2){let{x:a,y:r,z:n,alpha:o}=this.toXyzD65(t);return o<1?`color(xyz-d65 ${a} ${r} ${n} / ${o})`:`color(xyz-d65 ${a} ${r} ${n})`},b.prototype.mixLab=function(t,a=.5){let r=chunkPI5KJ3ZM_cjs.m(this._rawRgb()),n=chunkPI5KJ3ZM_cjs.m(new b(t)._rawRgb()),o=chunkYISEJCI6_cjs.a(a,0,1);return new b(chunkPI5KJ3ZM_cjs.p({l:r.l*(1-o)+n.l*o,a:r.a*(1-o)+n.a*o,b:r.b*(1-o)+n.b*o,alpha:chunkYISEJCI6_cjs.b(r.alpha*(1-o)+n.alpha*o,3),colorSpace:"lab"}))},b.prototype.delta=function(t="#fff"){return chunkYISEJCI6_cjs.b(chunkPI5KJ3ZM_cjs.o(chunkPI5KJ3ZM_cjs.n(this._rawRgb()),chunkPI5KJ3ZM_cjs.n(new b(t)._rawRgb()))/100,3)},f.push(chunkPI5KJ3ZM_cjs.r,chunkPI5KJ3ZM_cjs.s,chunkPI5KJ3ZM_cjs.h,chunkPI5KJ3ZM_cjs.g,chunkPI5KJ3ZM_cjs.i,chunkPI5KJ3ZM_cjs.f),x.push([chunkPI5KJ3ZM_cjs.r,"lab"],[chunkPI5KJ3ZM_cjs.s,"lab"],[chunkPI5KJ3ZM_cjs.h,"xyz-d65"],[chunkPI5KJ3ZM_cjs.g,"xyz-d65"],[chunkPI5KJ3ZM_cjs.i,"xyz"],[chunkPI5KJ3ZM_cjs.f,"xyz"]);},w=d;module.exports=w;//# sourceMappingURL=lab.cjs.map
//# sourceMappingURL=lab.cjs.map