export function warn(a,...b){var c,d;const e=null!==(c=null===(d=process)||void 0===d?void 0:d.env.NODE_ENV)&&void 0!==c?c:"development"}function hex2rgba(c){if(!/^#([\da-fA-F]{6}|[\da-fA-F]{8})$/.test(c))throw new Error(`颜色值 "${c}" 不是正确的十六进制格式！`);const d=parseInt(c.slice(1,3),16),e=parseInt(c.slice(3,5),16),f=parseInt(c.slice(5,7),16),b=parseInt(c.slice(7,9)||"ff",16);return[d,e,f,b]}function rgba2dotRGBA(c){const[d,e,f,b=255]=c;return[d/255,e/255,f/255,b/255]}export function createUnityColor(a){if(Array.isArray(a)){const[b,c,d,e=1]=rgba2dotRGBA(a);return{R:b,G:c,B:d,A:e}}if("transparent"===a)return{R:1,G:1,B:1,A:0};const b=hex2rgba(a),[c,d,e,f]=rgba2dotRGBA(b);return{R:c,G:d,B:e,A:f}}