/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{clamp as t}from"../../../../core/mathUtils.js";function r(t){switch(t){case"multiply":default:return 1;case"ignore":return 2;case"replace":return 3;case"tint":return 4}}function n(r,n,e){if(null==r||2===n)return e[0]=255,e[1]=255,e[2]=255,void(e[3]=255);const u=t(Math.round(r[3]*c),0,c),s=0===u||4===n?0:3===n?i:a;e[0]=t(Math.round(r[0]*o),0,o),e[1]=t(Math.round(r[1]*o),0,o),e[2]=t(Math.round(r[2]*o),0,o),e[3]=u+s}function e(t,r){for(let n=0;n<4;n++)t[n]=u(r[n]);return t}function u(t){return isNaN(t)?255:t*(254/255)}const o=255,c=85,i=c,a=2*c;export{e as encodeNaNUInt8,n as encodeSymbolColor,r as parseColorMixMode};
