import {i,h,s,t,A as A$1,B,q as q$1,n,r,j,k,m,l}from'../chunk-3LS3HCHH.mjs';import {a}from'../chunk-OX5CMKKI.mjs';import'../chunk-F4W4HJCD.mjs';import {d}from'../chunk-YLJRINFM.mjs';import'../chunk-Q3O3QQ4H.mjs';import {b}from'../chunk-IOXRZECH.mjs';var $=(r,n,o)=>a(...j(r,n,o)),A=(r,n,o)=>{let[e,t,m]=i(r,n,o);return [d(e),d(t),d(m)]},S=(r,n,o,e)=>{h(r,n,o,e),r[0]=d(r[0]),r[1]=d(r[1]),r[2]=d(r[2]);},E=(r,n,o)=>A(...s(r,n,o)),q=(r,n,o,e)=>{t(r,n,o,e),S(r,r[0],r[1],r[2]);},I=Math.PI/180,v=(r,n,o)=>A(...A$1(r,n,o)),M=(r,n,o,e)=>{B(r,n,o,e),S(r,r[0],r[1],r[2]);},z=(r,n,o)=>{let e=o*I;return v(r,n*Math.cos(e),n*Math.sin(e))},H=(r,n,o,e)=>{let t=e*I;M(r,n,o*Math.cos(t),o*Math.sin(t));},J=r=>q$1(r,n),_=(r$1,n$1,o)=>{r$1.toGamutRec2020=e=>{let t=r(e,n,$);if(t===null)return new r$1(e);let[m,b,a]=t.linear,[k,F,G]=j(m,b,a);return r$1._makeFromLinearSrgb(k,F,G,t.alpha)},r$1.prototype.toRec2020=function(e=4){let{r:t,g:m,b: b$1,alpha:a}=k(this._rawRgb());return {r:b(t,e),g:b(m,e),b:b(b$1,e),alpha:a,colorSpace:"rec2020"}},r$1.prototype.toRec2020String=function(e=4){let{r:t,g:m,b,alpha:a}=this.toRec2020(e);return a<1?`color(rec2020 ${t} ${m} ${b} / ${a})`:`color(rec2020 ${t} ${m} ${b})`},n$1.push(m,l),o.push([m,"rec2020"],[l,"rec2020"]);},K=_;export{K as default,J as inGamutRec2020,v as labToRec2020Channels,M as labToRec2020ChannelsInto,z as lchToRec2020Channels,H as lchToRec2020ChannelsInto,A as linearToRec2020Channels,S as linearToRec2020ChannelsInto,E as oklchToRec2020Channels,q as oklchToRec2020ChannelsInto};//# sourceMappingURL=rec2020.mjs.map
//# sourceMappingURL=rec2020.mjs.map