PageSourceSearch

https://l2beat.com/static/assets/generateColors-4JfNiwhN.js

js l2beat.com collected 2026-09-24 17:40:02 UTC 1,860 bytes, 1 lines download raw bytes

1import{on as e}from"./SideNavLayout-CqAX2xpZ.js";var t=20,n=[`#e69f00`,`#56b4e9`,`#009e73`,`#f5c710`,`#0072b2`,`#d55e00`,`#cc79a7`,`#88ccee`,`#ddcc77`,`#117733`,`#661100`],r=n.map(a);function i(e){if(e<=n.length)return n.slice(0,e);let i=r.slice(),a=[];for(let e of[30,55,80])for(let t=0;t<360;t+=10){let n=t*Math.PI/180,r=Math.cos(n)*60,i=Math.sin(n)*60;a.push({L:e,a:r,b:i})}let c=a.filter(e=>i.every(n=>s(e,n)>t));for(;i.length<e&&c.length;){let e=0,n=-1/0;c.forEach((t,r)=>{let a=Math.min(...i.map(e=>s(t,e)));a>n&&(n=a,e=r)});let r=c.splice(e,1)[0];if(!r)throw Error(`No new color found`);i.push(r);for(let[e,n]of c.entries())s(n,r)<t&&c.splice(e,1)}return i.map(o).slice(0,e)}function a(t){let n=Number.parseInt(t.slice(1),16),[r,i,a]=[n>>16&255,n>>8&255,n&255].map(e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4});e(r!==void 0&&i!==void 0&&a!==void 0,`R, G, B are required`);let o=r*.4124+i*.3576+a*.1805,s=r*.2126+i*.7152+a*.0722,c=r*.0193+i*.1192+a*.9505,[l,u,d]=[.95047,1,1.08883],f=o/l>.008856?Math.cbrt(o/l):7.787*o/l+16/116,p=s/u>.008856?Math.cbrt(s/u):7.787*s/u+16/116,m=c/d>.008856?Math.cbrt(c/d):7.787*c/d+16/116;return{L:116*p-16,a:500*(f-p),b:200*(p-m)}}function o(t){let{L:n,a:r,b:i}=t,a=(n+16)/116,o=a+r/500,s=a-i/200,[c,l,u]=[.95047,1,1.08883],[d,f,p]=[o**3,a**3,s**3],m=c*(d>.008856?d:(o-16/116)/7.787),h=l*(f>.008856?f:(a-16/116)/7.787),g=u*(p>.008856?p:(s-16/116)/7.787),_=3.2406*m+-1.5372*h+-.4986*g,v=-.9689*m+1.8758*h+.0415*g,y=.0557*m+-.204*h+1.057*g,b=e=>e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;[_,v,y]=[b(_),b(v),b(y)];let[x,S,C]=[_,v,y].map(e=>Math.round(Math.min(Math.max(e,0),1)*255)),w=e=>e.toString(16).padStart(2,`0`);return e(x!==void 0&&S!==void 0&&C!==void 0,`r, g, b are required`),`#${w(x)}${w(S)}${w(C)}`}function s(e,t){let n=e.L-t.L,r=e.a-t.a,i=e.b-t.b;return Math.sqrt(n*n+r*r+i*i)}export{i as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.