import {b,a,s,t,A as A$1,B,q as q$1,g,r,c,d,f,e}from'../chunk-3LS3HCHH.mjs';import {a as a$1}from'../chunk-OX5CMKKI.mjs';import'../chunk-F4W4HJCD.mjs';import {b as b$1}from'../chunk-YLJRINFM.mjs';import'../chunk-Q3O3QQ4H.mjs';import {b as b$2}from'../chunk-IOXRZECH.mjs';var $=(r,o,e)=>a$1(...c(r,o,e)),A=(r,o,e)=>{let[n,t,m]=b(r,o,e);return [b$1(n),b$1(t),b$1(m)]},S=(r,o,e,n)=>{a(r,o,e,n),r[0]=b$1(r[0]),r[1]=b$1(r[1]),r[2]=b$1(r[2]);},E=(r,o,e)=>A(...s(r,o,e)),q=(r,o,e,n)=>{t(r,o,e,n),S(r,r[0],r[1],r[2]);},I=Math.PI/180,R=(r,o,e)=>A(...A$1(r,o,e)),M=(r,o,e,n)=>{B(r,o,e,n),S(r,r[0],r[1],r[2]);},z=(r,o,e)=>{let n=e*I;return R(r,o*Math.cos(n),o*Math.sin(n))},H=(r,o,e,n)=>{let t=n*I;M(r,o,e*Math.cos(t),e*Math.sin(t));},J=r=>q$1(r,g),v=(r$1,o,e$1)=>{r$1.toGamutP3=n=>{let t=r(n,g,$);if(t===null)return new r$1(n);let[m,a,u]=t.linear,[k,F,G]=c(m,a,u);return r$1._makeFromLinearSrgb(k,F,G,t.alpha)},r$1.prototype.toP3=function(n=4){let{r:t,g:m,b:a,alpha:u}=d(this._rawRgb());return {r:b$2(t,n),g:b$2(m,n),b:b$2(a,n),alpha:u,colorSpace:"display-p3"}},r$1.prototype.toP3String=function(n=4){let{r:t,g:m,b:a,alpha:u}=this.toP3(n);return u<1?`color(display-p3 ${t} ${m} ${a} / ${u})`:`color(display-p3 ${t} ${m} ${a})`},o.push(f,e),e$1.push([f,"p3"],[e,"p3"]);},K=v;export{K as default,J as inGamutP3,R as labToP3Channels,M as labToP3ChannelsInto,z as lchToP3Channels,H as lchToP3ChannelsInto,A as linearToP3Channels,S as linearToP3ChannelsInto,E as oklchToP3Channels,q as oklchToP3ChannelsInto};//# sourceMappingURL=p3.mjs.map
//# sourceMappingURL=p3.mjs.map