import {w,v as v$1,G,H as H$1,O,P,E as E$1,B,F,x,y,A as A$1,z as z$1}from'../chunk-JT2PPQ6V.mjs';import {a}from'../chunk-2FEDFNW7.mjs';import'../chunk-YQKSXMBN.mjs';import {d}from'../chunk-WGY6QKPW.mjs';import'../chunk-GLKEY6D3.mjs';import {b}from'../chunk-IOXRZECH.mjs';var $=(r,n,o)=>a(...x(r,n,o)),A=(r,n,o)=>{let[e,t,m]=w(r,n,o);return [d(e),d(t),d(m)]},S=(r,n,o,e)=>{v$1(r,n,o,e),r[0]=d(r[0]),r[1]=d(r[1]),r[2]=d(r[2]);},E=(r,n,o)=>A(...G(r,n,o)),q=(r,n,o,e)=>{H$1(r,n,o,e),S(r,r[0],r[1],r[2]);},I=Math.PI/180,v=(r,n,o)=>A(...O(r,n,o)),M=(r,n,o,e)=>{P(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=>E$1(r,B),_=(r,n,o)=>{r.toGamutRec2020=e=>{let t=F(e,B,$);if(t===null)return new r(e);let[m,b,a]=t.linear,[k,F$1,G]=x(m,b,a);return r._makeFromLinearSrgb(k,F$1,G,t.alpha)},r.prototype.toRec2020=function(e=4){let{r:t,g:m,b: b$1,alpha:a}=y(this._rawRgb());return {r:b(t,e),g:b(m,e),b:b(b$1,e),alpha:a,colorSpace:"rec2020"}},r.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.push(A$1,z$1),o.push([A$1,"rec2020"],[z$1,"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