import{FastColor as i}from"../../../../../@ant-design_fast-color@2.0.6/node_modules/@ant-design/fast-color/es/FastColor.mjs";var m=2,f=.16,S=.05,c=.05,k=.15,p=5,v=4,w=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function s(t,r,a){var n;return Math.round(t.h)>=60&&Math.round(t.h)<=240?n=a?Math.round(t.h)-m*r:Math.round(t.h)+m*r:n=a?Math.round(t.h)+m*r:Math.round(t.h)-m*r,n<0?n+=360:n>=360&&(n-=360),n}function h(t,r,a){if(t.h===0&&t.s===0)return t.s;var n;return a?n=t.s-f*r:r===v?n=t.s+f:n=t.s+S*r,n>1&&(n=1),a&&r===p&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function x(t,r,a){var n;return a?n=t.v+c*r:n=t.v-k*r,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function b(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=[],n=new i(t),e=n.toHsv(),u=p;u>0;u-=1){var l=new i({h:s(e,u,!0),s:h(e,u,!0),v:x(e,u,!0)});a.push(l)}a.push(n);for(var o=1;o<=v;o+=1){var g=new i({h:s(e,o),s:h(e,o),v:x(e,o)});a.push(g)}return r.theme==="dark"?w.map(function(d){var M=d.index,C=d.amount;return new i(r.backgroundColor||"#141414").mix(a[M],C).toHexString()}):a.map(function(d){return d.toHexString()})}export{b as default};
