From 815f1515f1c69cb0a375948bbe9d001226731eb5 Mon Sep 17 00:00:00 2001 From: Brian Beck Date: Fri, 11 Oct 2024 16:07:25 -0700 Subject: [PATCH] Rebuild demo --- demo/app/components.tsx | 2 ++ demo/app/page.tsx | 4 ++-- demo/src/ColorSlider.tsx | 8 ++++++-- docs/404.html | 2 +- docs/404/index.html | 2 +- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 docs/_next/static/chunks/app/page-a093ff4dc3a3e529.js | 1 + docs/_next/static/chunks/app/page-fec68a5577a2e826.js | 1 - docs/index.html | 2 +- docs/index.txt | 8 ++++---- 11 files changed, 18 insertions(+), 12 deletions(-) rename docs/_next/static/{FJvtvnjf3bKxMO8SYQRcW => 5KBG7e5Qfr8Cb-zKKQA_Q}/_buildManifest.js (100%) rename docs/_next/static/{FJvtvnjf3bKxMO8SYQRcW => 5KBG7e5Qfr8Cb-zKKQA_Q}/_ssgManifest.js (100%) create mode 100644 docs/_next/static/chunks/app/page-a093ff4dc3a3e529.js delete mode 100644 docs/_next/static/chunks/app/page-fec68a5577a2e826.js diff --git a/demo/app/components.tsx b/demo/app/components.tsx index 20dcaa3..ca5d468 100644 --- a/demo/app/components.tsx +++ b/demo/app/components.tsx @@ -27,6 +27,7 @@ export function ColorConvert() {
{ Snap arbitrary colors to the indexed Turbo palette. This can yield surprising results with much of the sRGB color space; it’s mostly useful for interpreting visual­izations exported with an - approx­imation of Turbo or a lossy format like JPEG, where the - colors won’t be in the Turbo lookup table. + approx­imation of Turbo or a lossy format like JPEG, where not + every pixel will be in the Turbo lookup table.

The nearest color is determined by simple Euclidian distance using a diff --git a/demo/src/ColorSlider.tsx b/demo/src/ColorSlider.tsx index ffe6a0b..d571d53 100644 --- a/demo/src/ColorSlider.tsx +++ b/demo/src/ColorSlider.tsx @@ -15,12 +15,14 @@ const toGradientStops = (colorStops: Color[]) => { }; export default function ColorSlider({ + label = "Select color", className, colorStops, scaleImage, value: valueFromProps, onChange, }: { + label?: string; className?: string; colorStops?: Color[]; scaleImage?: string; @@ -35,18 +37,20 @@ export default function ColorSlider({ return { "--color-gradient": `url("${scaleImage}")`, } as React.CSSProperties; - } else { + } else if (colorStops) { const colorString = toGradientStops(colorStops).join(", "); return { "--color-gradient": `linear-gradient(to right, ${colorString})`, } as React.CSSProperties; + } else { + return {}; } }, [colorStops, scaleImage]); return (

404: This page could not be found.

404

This page could not be found.

Wanna say thanks?

Buy Me A Coffee
Wanna do fancy stuff on the Web?
I’m available for consulting, just get in touch!
\ No newline at end of file +404: This page could not be found.

404

This page could not be found.

Wanna say thanks?

Buy Me A Coffee
Wanna do fancy stuff on the Web?
I’m available for consulting, just get in touch!
\ No newline at end of file diff --git a/docs/404/index.html b/docs/404/index.html index d77bf3d..a7bf201 100644 --- a/docs/404/index.html +++ b/docs/404/index.html @@ -1 +1 @@ -404: This page could not be found.

404

This page could not be found.

Wanna say thanks?

Buy Me A Coffee
Wanna do fancy stuff on the Web?
I’m available for consulting, just get in touch!
\ No newline at end of file +404: This page could not be found.

404

This page could not be found.

Wanna say thanks?

Buy Me A Coffee
Wanna do fancy stuff on the Web?
I’m available for consulting, just get in touch!
\ No newline at end of file diff --git a/docs/_next/static/FJvtvnjf3bKxMO8SYQRcW/_buildManifest.js b/docs/_next/static/5KBG7e5Qfr8Cb-zKKQA_Q/_buildManifest.js similarity index 100% rename from docs/_next/static/FJvtvnjf3bKxMO8SYQRcW/_buildManifest.js rename to docs/_next/static/5KBG7e5Qfr8Cb-zKKQA_Q/_buildManifest.js diff --git a/docs/_next/static/FJvtvnjf3bKxMO8SYQRcW/_ssgManifest.js b/docs/_next/static/5KBG7e5Qfr8Cb-zKKQA_Q/_ssgManifest.js similarity index 100% rename from docs/_next/static/FJvtvnjf3bKxMO8SYQRcW/_ssgManifest.js rename to docs/_next/static/5KBG7e5Qfr8Cb-zKKQA_Q/_ssgManifest.js diff --git a/docs/_next/static/chunks/app/page-a093ff4dc3a3e529.js b/docs/_next/static/chunks/app/page-a093ff4dc3a3e529.js new file mode 100644 index 0000000..c12e3ad --- /dev/null +++ b/docs/_next/static/chunks/app/page-a093ff4dc3a3e529.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{7286:function(e,a,t){Promise.resolve().then(t.bind(t,2817)),Promise.resolve().then(t.t.bind(t,8240,23))},2817:function(e,a,t){"use strict";t.d(a,{ColorConvert:function(){return S},ImageConvert:function(){return I},Quantizer:function(){return y}});var r=t(7821),n=t(8078),l=t(2937),o=t(2266),s=t(3164),c=t(959),i=t(8352);let d=new Float32Array([.18995,.07176,.23217,.19483,.08339,.26149,.19956,.09498,.29024,.20415,.10652,.31844,.2086,.11802,.34607,.21291,.12947,.37314,.21708,.14087,.39964,.22111,.15223,.42558,.225,.16354,.45096,.22875,.17481,.47578,.23236,.18603,.50004,.23582,.1972,.52373,.23915,.20833,.54686,.24234,.21941,.56942,.24539,.23044,.59142,.2483,.24143,.61286,.25107,.25237,.63374,.25369,.26327,.65406,.25618,.27412,.67381,.25853,.28492,.693,.26074,.29568,.71162,.2628,.30639,.72968,.26473,.31706,.74718,.26652,.32768,.76412,.26816,.33825,.7805,.26967,.34878,.79631,.27103,.35926,.81156,.27226,.3697,.82624,.27334,.38008,.84037,.27429,.39043,.85393,.27509,.40072,.86692,.27576,.41097,.87936,.27628,.42118,.89123,.27667,.43134,.90254,.27691,.44145,.91328,.27701,.45152,.92347,.27698,.46153,.93309,.2768,.47151,.94214,.27648,.48144,.95064,.27603,.49132,.95857,.27543,.50115,.96594,.27469,.51094,.97275,.27381,.52069,.97899,.27273,.5304,.98461,.27106,.54015,.9893,.26878,.54995,.99303,.26592,.55979,.99583,.26252,.56967,.99773,.25862,.57958,.99876,.25425,.5895,.99896,.24946,.59943,.99835,.24427,.60937,.99697,.23874,.61931,.99485,.23288,.62923,.99202,.22676,.63913,.98851,.22039,.64901,.98436,.21382,.65886,.97959,.20708,.66866,.97423,.20021,.67842,.96833,.19326,.68812,.9619,.18625,.69775,.95498,.17923,.70732,.94761,.17223,.7168,.93981,.16529,.7262,.93161,.15844,.73551,.92305,.15173,.74472,.91416,.14519,.75381,.90496,.13886,.76279,.8955,.13278,.77165,.8858,.12698,.78037,.8759,.12151,.78896,.86581,.11639,.7974,.85559,.11167,.80569,.84525,.10738,.81381,.83484,.10357,.82177,.82437,.10026,.82955,.81389,.0975,.83714,.80342,.09532,.84455,.79299,.09377,.85175,.78264,.09287,.85875,.7724,.09267,.86554,.7623,.0932,.87211,.75237,.09451,.87844,.74265,.09662,.88454,.73316,.09958,.8904,.72393,.10342,.896,.715,.10815,.90142,.70599,.11374,.90673,.69651,.12014,.91193,.6866,.12733,.91701,.67627,.13526,.92197,.66556,.14391,.9268,.65448,.15323,.93151,.64308,.16319,.93609,.63137,.17377,.94053,.61938,.18491,.94484,.60713,.19659,.94901,.59466,.20877,.95304,.58199,.22142,.95692,.56914,.23449,.96065,.55614,.24797,.96423,.54303,.2618,.96765,.52981,.27597,.97092,.51653,.29042,.97403,.50321,.30513,.97697,.48987,.32006,.97974,.47654,.33517,.98234,.46325,.35043,.98477,.45002,.36581,.98702,.43688,.38127,.98909,.42386,.39678,.99098,.41098,.41229,.99268,.39826,.42778,.99419,.38575,.44321,.99551,.37345,.45854,.99663,.3614,.47375,.99755,.34963,.48879,.99828,.33816,.50362,.99879,.32701,.51822,.9991,.31622,.53255,.99919,.30581,.54658,.99907,.29581,.56026,.99873,.28623,.57357,.99817,.27712,.58646,.99739,.26849,.59891,.99638,.26038,.61088,.99514,.2528,.62233,.99366,.24579,.63323,.99195,.23937,.64362,.98999,.23356,.65394,.98775,.22835,.66428,.98524,.2237,.67462,.98246,.2196,.68494,.97941,.21602,.69525,.9761,.21294,.70553,.97255,.21032,.71577,.96875,.20815,.72596,.9647,.2064,.7361,.96043,.20504,.74617,.95593,.20406,.75617,.95121,.20343,.76608,.94627,.20311,.77591,.94113,.2031,.78563,.93579,.20336,.79524,.93025,.20386,.80473,.92452,.20459,.8141,.91861,.20552,.82333,.91253,.20663,.83241,.90627,.20788,.84133,.89986,.20926,.8501,.89328,.21074,.85868,.88655,.2123,.86709,.87968,.21391,.8753,.87267,.21555,.88331,.86553,.21719,.89112,.85826,.2188,.8987,.85087,.22038,.90605,.84337,.22188,.91317,.83576,.22328,.92004,.82806,.22456,.92666,.82025,.2257,.93301,.81236,.22667,.93909,.80439,.22744,.94489,.79634,.228,.95039,.78823,.22831,.9556,.78005,.22836,.96049,.77181,.22811,.96507,.76352,.22754,.96931,.75519,.22663,.97323,.74682,.22536,.97679,.73842,.22369,.98,.73,.22161,.98289,.7214,.21918,.98549,.7125,.2165,.98781,.7033,.21358,.98986,.69382,.21043,.99163,.68408,.20706,.99314,.67408,.20348,.99438,.66386,.19971,.99535,.65341,.19577,.99607,.64277,.19165,.99654,.63193,.18738,.99675,.62093,.18297,.99672,.60977,.17842,.99644,.59846,.17376,.99593,.58703,.16899,.99517,.57549,.16412,.99419,.56386,.15918,.99297,.55214,.15417,.99153,.54036,.1491,.98987,.52854,.14398,.98799,.51667,.13883,.9859,.50479,.13367,.9836,.49291,.12849,.98108,.48104,.12332,.97837,.4692,.11817,.97545,.4574,.11305,.97234,.44565,.10797,.96904,.43399,.10294,.96555,.42241,.09798,.96187,.41093,.0931,.95801,.39958,.08831,.95398,.38836,.08362,.94977,.37729,.07905,.94538,.36638,.07461,.94084,.35566,.07031,.93612,.34513,.06616,.93125,.33482,.06218,.92623,.32473,.05837,.92105,.31489,.05475,.91572,.3053,.05134,.91024,.29599,.04814,.90463,.28696,.04516,.89888,.27824,.04243,.89298,.26981,.03993,.88691,.26152,.03753,.88066,.25334,.03521,.87422,.24526,.03297,.8676,.2373,.03082,.86079,.22945,.02875,.8538,.2217,.02677,.84662,.21407,.02487,.83926,.20654,.02305,.83172,.19912,.02131,.82399,.19182,.01966,.81608,.18462,.01809,.80799,.17753,.0166,.79971,.17055,.0152,.79125,.16368,.01387,.7826,.15693,.01264,.77377,.15028,.01148,.76476,.14374,.01041,.75556,.13731,.00942,.74617,.13098,.00851,.73661,.12477,.00769,.72686,.11867,.00695,.71692,.11268,.00629,.7068,.1068,.00571,.6965,.10102,.00522,.68602,.09536,.00481,.67535,.0898,.00449,.66449,.08436,.00424,.65345,.07902,.00408,.64223,.0738,.00401,.63082,.06868,.00401,.61923,.06367,.0041,.60746,.05878,.00427,.5955,.05399,.00453,.58336,.04931,.00486,.57103,.04474,.00529,.55852,.04028,.00579,.54583,.03593,.00638,.53295,.03169,.00705,.51989,.02756,.0078,.50664,.02354,.00863,.49321,.01963,.00955,.4796,.01583,.01055]),u=new Uint8ClampedArray(d.map(e=>Math.floor(255*e))),g=Array(256);for(let e=0;e{let[a,t,r]=e;return"rgb(".concat(a,", ").concat(t,", ").concat(r,")")},f=e=>e.map(j);function v(e){let{label:a="Select color",className:t,colorStops:l,scaleImage:o,value:s,onChange:c}=e,[i,d]=(0,n.useState)(127),u=(0,n.useMemo)(()=>{if(o)return{"--color-gradient":'url("'.concat(o,'")')};if(!l)return{};{let e=f(l).join(", ");return{"--color-gradient":"linear-gradient(to right, ".concat(e,")")}}},[l,o]);return(0,r.jsx)("div",{className:"".concat(b().Container," ").concat(null!=t?t:""),children:(0,r.jsx)(_.Range,{label:a,step:1,min:0,max:255,values:[null!=s?s:i],onChange:e=>{let[a]=e;null==s&&d(a),c&&c(a)},renderTrack:e=>{let{props:a,children:t}=e;return(0,r.jsx)("div",{...a,style:{...a.style,...u},className:b().RangeTrack,children:t})},renderThumb:e=>{let{props:a}=e;return(0,n.createElement)("div",{...a,key:a.key,className:b().Indicator},(0,r.jsx)(m.Ejc,{}))}})})}t(5561);var C=t(8240),k=t.n(C);let N="/turbo-colormap";function S(){let[e,a]=(0,n.useState)(165),t=p[e];return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:k().ColorConvert,children:[(0,r.jsxs)("div",{className:k().ColorSelect,children:[(0,r.jsx)(v,{label:"Select grayscale color",scaleImage:"".concat(N,"/grayscale.png"),value:e,onChange:a}),(0,r.jsxs)("dl",{className:k().Values,children:[(0,r.jsx)("dt",{children:"normalized:"}),(0,r.jsx)("dd",{children:(e/255).toFixed(9)}),(0,r.jsx)("dt",{children:"rgb:"}),(0,r.jsxs)("dd",{children:["rgb(",e,", ",e,", ",e,")"]}),(0,r.jsx)("dt",{children:"hex:"}),(0,r.jsxs)("dd",{children:["#",e.toString(16).padStart(2,"0"),e.toString(16).padStart(2,"0"),e.toString(16).padStart(2,"0")]})]}),(0,r.jsx)("div",{className:k().Color,style:{background:"rgb(".concat(e,", ").concat(e,", ").concat(e,")")}})]}),(0,r.jsxs)("div",{className:k().ColorSelect,children:[(0,r.jsx)(v,{label:"Select Turbo color",scaleImage:"".concat(N,"/turbo.png"),value:e,onChange:a}),(0,r.jsxs)("dl",{className:k().Values,children:[(0,r.jsx)("dt",{children:"normalized:"}),(0,r.jsx)("dd",{children:(e/255).toFixed(9)}),(0,r.jsx)("dt",{children:"rgb:"}),(0,r.jsxs)("dd",{children:["rgb(",t[0],", ",t[1],", ",t[2],")"]}),(0,r.jsx)("dt",{children:"hex:"}),(0,r.jsxs)("dd",{children:["#",t[0].toString(16).padStart(2,"0"),t[1].toString(16).padStart(2,"0"),t[2].toString(16).padStart(2,"0")]})]}),(0,r.jsx)("div",{className:k().Color,style:{background:"rgb(".concat(t[0],", ").concat(t[1],", ").concat(t[2],")")}})]})]})})}function y(){let[e,a]=(0,o.rd)("#4fdd47"),t=(0,n.useMemo)(()=>{let[a,t,r]=[Math.round(e.rgb.r),Math.round(e.rgb.g),Math.round(e.rgb.b)];return function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p[function(e){let a,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{cache:r}=t;if(r){a="".concat(e[0],",").concat(e[1],",").concat(e[2]);let t=r.get(a);if(null!=t)return t}let n=h.knnSearch(e,1)[0];return r&&r.set(a,n),n}(e,a)]}([a,t,r])},[e]);return(0,r.jsxs)("div",{className:k().Quantizer,children:[(0,r.jsxs)("div",{className:k().QuantizeOutput,children:[(0,r.jsx)("div",{className:k().QuantizeColor,style:{background:e.hex}}),(0,r.jsx)("div",{className:k().QuantizeColor,style:{background:"rgb(".concat(t[0],", ").concat(t[1],", ").concat(t[2],")")}})]}),(0,r.jsx)("div",{className:k().PickerContainer,children:(0,r.jsx)(o.zH,{color:e,onChange:a,hideAlpha:!0})})]})}function w(e){let{defaultImageUrl:a,onImageReady:t,dropMessage:o,isLoading:s=!1,imageData:i,enabled:d=!0}=e,u=(0,n.useRef)(null),[g,p]=(0,n.useState)(a),[h,_]=(0,n.useState)(null),[m,x]=(0,n.useState)("input"),b=(0,n.useCallback)(e=>{let a=URL.createObjectURL(e[0]);x("input"),p(a)},[]),{getRootProps:j,getInputProps:f,isDragActive:v}=(0,l.uI)({onDrop:b,accept:{"image/*":[]},multiple:!1});(0,n.useEffect)(()=>{if(u.current||(u.current=new OffscreenCanvas(1,1)),d&&g){let e=u.current,a=new Image;a.onload=()=>{let r=a.naturalWidth,n=a.naturalHeight;e.width=r,e.height=n;let l=e.getContext("2d",{alpha:!1});l.drawImage(a,0,0,r,n),t(g,l.getImageData(0,0,r,n))},a.src=g}},[d,g,t]),(0,n.useEffect)(()=>{if(g)return()=>{g.startsWith("blob:")&&URL.revokeObjectURL(g)}},[g]),(0,n.useEffect)(()=>{if(i&&d){let e=!1;return(async()=>{let a=u.current,{buffer:t,width:r,height:n}=i;a.width=r,a.height=n;let l=a.getContext("2d",{alpha:!1}),o=new ImageData(new Uint8ClampedArray(t),r,n);l.putImageData(o,0,0);let s=await a.convertToBlob();if(!e){let e=URL.createObjectURL(s);x("output"),_(e)}})(),()=>{e=!0}}},[i,d]),(0,n.useEffect)(()=>{if(h)return()=>{h.startsWith("blob:")&&URL.revokeObjectURL(h)}},[h]);let C="input"===m?g:h;return(0,r.jsxs)("div",{className:k().ImageZone,children:[(0,r.jsxs)("div",{...j(),className:k().DropRoot,children:[(0,r.jsx)("input",{...f()}),C?(0,r.jsx)("img",{className:k().Canvas,src:C}):null]}),(0,r.jsx)("div",{className:k().DropMessage,style:{display:v?"block":"none"},children:o}),(0,r.jsx)("div",{className:k().Loading,style:{display:s&&!v?"block":"none"},children:(0,r.jsx)(c.sst,{className:k().Spinner})})]})}function I(){let[e,a]=(0,n.useState)(!1),l=(0,n.useRef)(),[o,c]=(0,n.useState)(null),[i,d]=(0,n.useState)(null),u=(0,n.useCallback)((e,a)=>{c(t=>({id:t?t.id+1:1,source:"turbo",target:"grayscale",imageUrl:e,buffer:a.data.buffer,width:a.width,height:a.height}))},[]),g=(0,n.useCallback)((e,a)=>{c(t=>({id:t?t.id+1:1,source:"grayscale",target:"turbo",imageUrl:e,buffer:a.data.buffer,width:a.width,height:a.height}))},[]);return(0,n.useEffect)(()=>{if(o){var e;return l.current=new Worker(t.tu(new URL(t.p+t.u(99),t.b))),l.current.onmessage=e=>{d(e.data)},null===(e=l.current)||void 0===e||e.postMessage(o),()=>{var e;null===(e=l.current)||void 0===e||e.terminate()}}},[o]),(0,r.jsxs)("div",{className:k().Canvases,children:[(0,r.jsxs)("p",{className:k().Tip,children:["tap or drag & drop"," ",(0,r.jsx)("span",{className:k().ZoneName,children:"Turbo image"}),(0,r.jsx)(s.RiI,{className:k().DownArrow})]}),(0,r.jsxs)("p",{className:k().Tip,children:["tap or drag & drop"," ",(0,r.jsx)("span",{className:k().ZoneName,children:"grayscale image"}),(0,r.jsx)(s.RiI,{className:k().DownArrow})]}),(0,r.jsx)(w,{defaultImageUrl:"".concat(N,"/cocktail.depth.jpg"),onImageReady:u,dropMessage:"drop to upload Turbo image",imageData:(null==i?void 0:i.target)==="turbo"?i:null,isLoading:o&&"turbo"===o.target&&(null==i?void 0:i.id)!==o.id,enabled:e}),(0,r.jsx)(w,{onImageReady:g,dropMessage:"drop to upload grayscale image",imageData:(null==i?void 0:i.target)==="grayscale"?i:null,isLoading:o&&"grayscale"===o.target&&(null==i?void 0:i.id)!==o.id,enabled:e}),e?null:(0,r.jsxs)("div",{className:k().Blocker,children:[(0,r.jsx)("p",{children:"This demo will consume a little CPU and needs to be enabled first."}),(0,r.jsxs)("button",{className:k().UnblockButton,onClick:()=>{a(!0)},children:["Enable",(0,r.jsx)("strong",{children:(0,r.jsx)("em",{children:"!"})})]})]})]})}},8240:function(e){e.exports={ColorConvert:"page_ColorConvert__7VIoI",ColorSelect:"page_ColorSelect__nUc8H",Color:"page_Color__ya5K5",ImageZone:"page_ImageZone__PkBlf",Values:"page_Values__mm5vZ",Canvas:"page_Canvas__EOoli",CodeBlock:"page_CodeBlock__7_Pgq",Canvases:"page_Canvases__5m9cA",Starter:"page_Starter__FE66H",Description:"page_Description__64yKG",Quantizer:"page_Quantizer__dvOdS",QuantizeColor:"page_QuantizeColor__H4TS9",PickerContainer:"page_PickerContainer__LOs_I",QuantizeOutput:"page_QuantizeOutput__Nxqhh",Tip:"page_Tip__QiWQz",DownArrow:"page_DownArrow__UDRyL",ZoneName:"page_ZoneName__phrJJ",DropMessage:"page_DropMessage__lNFE8",Loading:"page_Loading__k4mIw",Spinner:"page_Spinner__AQC8Q",spin:"page_spin__OXxwq",DropRoot:"page_DropRoot__Q5OMd",Blocker:"page_Blocker__rPLYP",UnblockButton:"page_UnblockButton__LgsPm"}},5110:function(e){e.exports={Container:"ColorSlider_Container__fbcvW",RangeTrack:"ColorSlider_RangeTrack__k6ZoD",Indicator:"ColorSlider_Indicator__ZutBx"}}},function(e){e.O(0,[839,947,467,491,79,115,364,744],function(){return e(e.s=7286)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/docs/_next/static/chunks/app/page-fec68a5577a2e826.js b/docs/_next/static/chunks/app/page-fec68a5577a2e826.js deleted file mode 100644 index d7cb0ab..0000000 --- a/docs/_next/static/chunks/app/page-fec68a5577a2e826.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{7286:function(e,a,t){Promise.resolve().then(t.bind(t,2817)),Promise.resolve().then(t.t.bind(t,8240,23))},2817:function(e,a,t){"use strict";t.d(a,{ColorConvert:function(){return S},ImageConvert:function(){return I},Quantizer:function(){return y}});var r=t(7821),n=t(8078),l=t(2937),o=t(2266),s=t(3164),c=t(959),i=t(8352);let d=new Float32Array([.18995,.07176,.23217,.19483,.08339,.26149,.19956,.09498,.29024,.20415,.10652,.31844,.2086,.11802,.34607,.21291,.12947,.37314,.21708,.14087,.39964,.22111,.15223,.42558,.225,.16354,.45096,.22875,.17481,.47578,.23236,.18603,.50004,.23582,.1972,.52373,.23915,.20833,.54686,.24234,.21941,.56942,.24539,.23044,.59142,.2483,.24143,.61286,.25107,.25237,.63374,.25369,.26327,.65406,.25618,.27412,.67381,.25853,.28492,.693,.26074,.29568,.71162,.2628,.30639,.72968,.26473,.31706,.74718,.26652,.32768,.76412,.26816,.33825,.7805,.26967,.34878,.79631,.27103,.35926,.81156,.27226,.3697,.82624,.27334,.38008,.84037,.27429,.39043,.85393,.27509,.40072,.86692,.27576,.41097,.87936,.27628,.42118,.89123,.27667,.43134,.90254,.27691,.44145,.91328,.27701,.45152,.92347,.27698,.46153,.93309,.2768,.47151,.94214,.27648,.48144,.95064,.27603,.49132,.95857,.27543,.50115,.96594,.27469,.51094,.97275,.27381,.52069,.97899,.27273,.5304,.98461,.27106,.54015,.9893,.26878,.54995,.99303,.26592,.55979,.99583,.26252,.56967,.99773,.25862,.57958,.99876,.25425,.5895,.99896,.24946,.59943,.99835,.24427,.60937,.99697,.23874,.61931,.99485,.23288,.62923,.99202,.22676,.63913,.98851,.22039,.64901,.98436,.21382,.65886,.97959,.20708,.66866,.97423,.20021,.67842,.96833,.19326,.68812,.9619,.18625,.69775,.95498,.17923,.70732,.94761,.17223,.7168,.93981,.16529,.7262,.93161,.15844,.73551,.92305,.15173,.74472,.91416,.14519,.75381,.90496,.13886,.76279,.8955,.13278,.77165,.8858,.12698,.78037,.8759,.12151,.78896,.86581,.11639,.7974,.85559,.11167,.80569,.84525,.10738,.81381,.83484,.10357,.82177,.82437,.10026,.82955,.81389,.0975,.83714,.80342,.09532,.84455,.79299,.09377,.85175,.78264,.09287,.85875,.7724,.09267,.86554,.7623,.0932,.87211,.75237,.09451,.87844,.74265,.09662,.88454,.73316,.09958,.8904,.72393,.10342,.896,.715,.10815,.90142,.70599,.11374,.90673,.69651,.12014,.91193,.6866,.12733,.91701,.67627,.13526,.92197,.66556,.14391,.9268,.65448,.15323,.93151,.64308,.16319,.93609,.63137,.17377,.94053,.61938,.18491,.94484,.60713,.19659,.94901,.59466,.20877,.95304,.58199,.22142,.95692,.56914,.23449,.96065,.55614,.24797,.96423,.54303,.2618,.96765,.52981,.27597,.97092,.51653,.29042,.97403,.50321,.30513,.97697,.48987,.32006,.97974,.47654,.33517,.98234,.46325,.35043,.98477,.45002,.36581,.98702,.43688,.38127,.98909,.42386,.39678,.99098,.41098,.41229,.99268,.39826,.42778,.99419,.38575,.44321,.99551,.37345,.45854,.99663,.3614,.47375,.99755,.34963,.48879,.99828,.33816,.50362,.99879,.32701,.51822,.9991,.31622,.53255,.99919,.30581,.54658,.99907,.29581,.56026,.99873,.28623,.57357,.99817,.27712,.58646,.99739,.26849,.59891,.99638,.26038,.61088,.99514,.2528,.62233,.99366,.24579,.63323,.99195,.23937,.64362,.98999,.23356,.65394,.98775,.22835,.66428,.98524,.2237,.67462,.98246,.2196,.68494,.97941,.21602,.69525,.9761,.21294,.70553,.97255,.21032,.71577,.96875,.20815,.72596,.9647,.2064,.7361,.96043,.20504,.74617,.95593,.20406,.75617,.95121,.20343,.76608,.94627,.20311,.77591,.94113,.2031,.78563,.93579,.20336,.79524,.93025,.20386,.80473,.92452,.20459,.8141,.91861,.20552,.82333,.91253,.20663,.83241,.90627,.20788,.84133,.89986,.20926,.8501,.89328,.21074,.85868,.88655,.2123,.86709,.87968,.21391,.8753,.87267,.21555,.88331,.86553,.21719,.89112,.85826,.2188,.8987,.85087,.22038,.90605,.84337,.22188,.91317,.83576,.22328,.92004,.82806,.22456,.92666,.82025,.2257,.93301,.81236,.22667,.93909,.80439,.22744,.94489,.79634,.228,.95039,.78823,.22831,.9556,.78005,.22836,.96049,.77181,.22811,.96507,.76352,.22754,.96931,.75519,.22663,.97323,.74682,.22536,.97679,.73842,.22369,.98,.73,.22161,.98289,.7214,.21918,.98549,.7125,.2165,.98781,.7033,.21358,.98986,.69382,.21043,.99163,.68408,.20706,.99314,.67408,.20348,.99438,.66386,.19971,.99535,.65341,.19577,.99607,.64277,.19165,.99654,.63193,.18738,.99675,.62093,.18297,.99672,.60977,.17842,.99644,.59846,.17376,.99593,.58703,.16899,.99517,.57549,.16412,.99419,.56386,.15918,.99297,.55214,.15417,.99153,.54036,.1491,.98987,.52854,.14398,.98799,.51667,.13883,.9859,.50479,.13367,.9836,.49291,.12849,.98108,.48104,.12332,.97837,.4692,.11817,.97545,.4574,.11305,.97234,.44565,.10797,.96904,.43399,.10294,.96555,.42241,.09798,.96187,.41093,.0931,.95801,.39958,.08831,.95398,.38836,.08362,.94977,.37729,.07905,.94538,.36638,.07461,.94084,.35566,.07031,.93612,.34513,.06616,.93125,.33482,.06218,.92623,.32473,.05837,.92105,.31489,.05475,.91572,.3053,.05134,.91024,.29599,.04814,.90463,.28696,.04516,.89888,.27824,.04243,.89298,.26981,.03993,.88691,.26152,.03753,.88066,.25334,.03521,.87422,.24526,.03297,.8676,.2373,.03082,.86079,.22945,.02875,.8538,.2217,.02677,.84662,.21407,.02487,.83926,.20654,.02305,.83172,.19912,.02131,.82399,.19182,.01966,.81608,.18462,.01809,.80799,.17753,.0166,.79971,.17055,.0152,.79125,.16368,.01387,.7826,.15693,.01264,.77377,.15028,.01148,.76476,.14374,.01041,.75556,.13731,.00942,.74617,.13098,.00851,.73661,.12477,.00769,.72686,.11867,.00695,.71692,.11268,.00629,.7068,.1068,.00571,.6965,.10102,.00522,.68602,.09536,.00481,.67535,.0898,.00449,.66449,.08436,.00424,.65345,.07902,.00408,.64223,.0738,.00401,.63082,.06868,.00401,.61923,.06367,.0041,.60746,.05878,.00427,.5955,.05399,.00453,.58336,.04931,.00486,.57103,.04474,.00529,.55852,.04028,.00579,.54583,.03593,.00638,.53295,.03169,.00705,.51989,.02756,.0078,.50664,.02354,.00863,.49321,.01963,.00955,.4796,.01583,.01055]),u=new Uint8ClampedArray(d.map(e=>Math.floor(255*e))),g=Array(256);for(let e=0;e{let[a,t,r]=e;return"rgb(".concat(a,", ").concat(t,", ").concat(r,")")},f=e=>e.map(j);function v(e){let{className:a,colorStops:t,scaleImage:l,value:o,onChange:s}=e,[c,i]=(0,n.useState)(127),d=(0,n.useMemo)(()=>{if(l)return{"--color-gradient":'url("'.concat(l,'")')};{let e=f(t).join(", ");return{"--color-gradient":"linear-gradient(to right, ".concat(e,")")}}},[t,l]);return(0,r.jsx)("div",{className:"".concat(b().Container," ").concat(null!=a?a:""),children:(0,r.jsx)(_.Range,{label:"Select your value",step:1,min:0,max:255,values:[null!=o?o:c],onChange:e=>{let[a]=e;null==o&&i(a),s&&s(a)},renderTrack:e=>{let{props:a,children:t}=e;return(0,r.jsx)("div",{...a,style:{...a.style,...d},className:b().RangeTrack,children:t})},renderThumb:e=>{let{props:a}=e;return(0,n.createElement)("div",{...a,key:a.key,className:b().Indicator},(0,r.jsx)(m.Ejc,{}))}})})}t(5561);var C=t(8240),k=t.n(C);let N="/turbo-colormap";function S(){let[e,a]=(0,n.useState)(165),t=p[e];return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:k().ColorConvert,children:[(0,r.jsxs)("div",{className:k().ColorSelect,children:[(0,r.jsx)(v,{scaleImage:"".concat(N,"/grayscale.png"),value:e,onChange:a}),(0,r.jsxs)("dl",{className:k().Values,children:[(0,r.jsx)("dt",{children:"normalized:"}),(0,r.jsx)("dd",{children:(e/255).toFixed(9)}),(0,r.jsx)("dt",{children:"rgb:"}),(0,r.jsxs)("dd",{children:["rgb(",e,", ",e,", ",e,")"]}),(0,r.jsx)("dt",{children:"hex:"}),(0,r.jsxs)("dd",{children:["#",e.toString(16).padStart(2,"0"),e.toString(16).padStart(2,"0"),e.toString(16).padStart(2,"0")]})]}),(0,r.jsx)("div",{className:k().Color,style:{background:"rgb(".concat(e,", ").concat(e,", ").concat(e,")")}})]}),(0,r.jsxs)("div",{className:k().ColorSelect,children:[(0,r.jsx)(v,{scaleImage:"".concat(N,"/turbo.png"),value:e,onChange:a}),(0,r.jsxs)("dl",{className:k().Values,children:[(0,r.jsx)("dt",{children:"normalized:"}),(0,r.jsx)("dd",{children:(e/255).toFixed(9)}),(0,r.jsx)("dt",{children:"rgb:"}),(0,r.jsxs)("dd",{children:["rgb(",t[0],", ",t[1],", ",t[2],")"]}),(0,r.jsx)("dt",{children:"hex:"}),(0,r.jsxs)("dd",{children:["#",t[0].toString(16).padStart(2,"0"),t[1].toString(16).padStart(2,"0"),t[2].toString(16).padStart(2,"0")]})]}),(0,r.jsx)("div",{className:k().Color,style:{background:"rgb(".concat(t[0],", ").concat(t[1],", ").concat(t[2],")")}})]})]})})}function y(){let[e,a]=(0,o.rd)("#4fdd47"),t=(0,n.useMemo)(()=>{let[a,t,r]=[Math.round(e.rgb.r),Math.round(e.rgb.g),Math.round(e.rgb.b)];return function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p[function(e){let a,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{cache:r}=t;if(r){a="".concat(e[0],",").concat(e[1],",").concat(e[2]);let t=r.get(a);if(null!=t)return t}let n=h.knnSearch(e,1)[0];return r&&r.set(a,n),n}(e,a)]}([a,t,r])},[e]);return(0,r.jsxs)("div",{className:k().Quantizer,children:[(0,r.jsxs)("div",{className:k().QuantizeOutput,children:[(0,r.jsx)("div",{className:k().QuantizeColor,style:{background:e.hex}}),(0,r.jsx)("div",{className:k().QuantizeColor,style:{background:"rgb(".concat(t[0],", ").concat(t[1],", ").concat(t[2],")")}})]}),(0,r.jsx)("div",{className:k().PickerContainer,children:(0,r.jsx)(o.zH,{color:e,onChange:a,hideAlpha:!0})})]})}function w(e){let{defaultImageUrl:a,onImageReady:t,dropMessage:o,isLoading:s=!1,imageData:i,enabled:d=!0}=e,u=(0,n.useRef)(null),[g,p]=(0,n.useState)(a),[h,_]=(0,n.useState)(null),[m,x]=(0,n.useState)("input"),b=(0,n.useCallback)(e=>{let a=URL.createObjectURL(e[0]);x("input"),p(a)},[]),{getRootProps:j,getInputProps:f,isDragActive:v}=(0,l.uI)({onDrop:b,accept:{"image/*":[]},multiple:!1});(0,n.useEffect)(()=>{if(u.current||(u.current=new OffscreenCanvas(1,1)),d&&g){let e=u.current,a=new Image;a.onload=()=>{let r=a.naturalWidth,n=a.naturalHeight;e.width=r,e.height=n;let l=e.getContext("2d",{alpha:!1});l.drawImage(a,0,0,r,n),t(g,l.getImageData(0,0,r,n))},a.src=g}},[d,g,t]),(0,n.useEffect)(()=>{if(g)return()=>{g.startsWith("blob:")&&URL.revokeObjectURL(g)}},[g]),(0,n.useEffect)(()=>{if(i&&d){let e=!1;return(async()=>{let a=u.current,{buffer:t,width:r,height:n}=i;a.width=r,a.height=n;let l=a.getContext("2d",{alpha:!1}),o=new ImageData(new Uint8ClampedArray(t),r,n);l.putImageData(o,0,0);let s=await a.convertToBlob();if(!e){let e=URL.createObjectURL(s);x("output"),_(e)}})(),()=>{e=!0}}},[i,d]),(0,n.useEffect)(()=>{if(h)return()=>{h.startsWith("blob:")&&URL.revokeObjectURL(h)}},[h]);let C="input"===m?g:h;return(0,r.jsxs)("div",{className:k().ImageZone,children:[(0,r.jsxs)("div",{...j(),className:k().DropRoot,children:[(0,r.jsx)("input",{...f()}),C?(0,r.jsx)("img",{className:k().Canvas,src:C}):null]}),(0,r.jsx)("div",{className:k().DropMessage,style:{display:v?"block":"none"},children:o}),(0,r.jsx)("div",{className:k().Loading,style:{display:s&&!v?"block":"none"},children:(0,r.jsx)(c.sst,{className:k().Spinner})})]})}function I(){let[e,a]=(0,n.useState)(!1),l=(0,n.useRef)(),[o,c]=(0,n.useState)(null),[i,d]=(0,n.useState)(null),u=(0,n.useCallback)((e,a)=>{c(t=>({id:t?t.id+1:1,source:"turbo",target:"grayscale",imageUrl:e,buffer:a.data.buffer,width:a.width,height:a.height}))},[]),g=(0,n.useCallback)((e,a)=>{c(t=>({id:t?t.id+1:1,source:"grayscale",target:"turbo",imageUrl:e,buffer:a.data.buffer,width:a.width,height:a.height}))},[]);return(0,n.useEffect)(()=>{if(o){var e;return l.current=new Worker(t.tu(new URL(t.p+t.u(99),t.b))),l.current.onmessage=e=>{d(e.data)},null===(e=l.current)||void 0===e||e.postMessage(o),()=>{var e;null===(e=l.current)||void 0===e||e.terminate()}}},[o]),(0,r.jsxs)("div",{className:k().Canvases,children:[(0,r.jsxs)("p",{className:k().Tip,children:["tap or drag & drop"," ",(0,r.jsx)("span",{className:k().ZoneName,children:"Turbo image"}),(0,r.jsx)(s.RiI,{className:k().DownArrow})]}),(0,r.jsxs)("p",{className:k().Tip,children:["tap or drag & drop"," ",(0,r.jsx)("span",{className:k().ZoneName,children:"grayscale image"}),(0,r.jsx)(s.RiI,{className:k().DownArrow})]}),(0,r.jsx)(w,{defaultImageUrl:"".concat(N,"/cocktail.depth.jpg"),onImageReady:u,dropMessage:"drop to upload Turbo image",imageData:(null==i?void 0:i.target)==="turbo"?i:null,isLoading:o&&"turbo"===o.target&&(null==i?void 0:i.id)!==o.id,enabled:e}),(0,r.jsx)(w,{onImageReady:g,dropMessage:"drop to upload grayscale image",imageData:(null==i?void 0:i.target)==="grayscale"?i:null,isLoading:o&&"grayscale"===o.target&&(null==i?void 0:i.id)!==o.id,enabled:e}),e?null:(0,r.jsxs)("div",{className:k().Blocker,children:[(0,r.jsx)("p",{children:"This demo will consume a little CPU and needs to be enabled first."}),(0,r.jsxs)("button",{className:k().UnblockButton,onClick:()=>{a(!0)},children:["Enable",(0,r.jsx)("strong",{children:(0,r.jsx)("em",{children:"!"})})]})]})]})}},8240:function(e){e.exports={ColorConvert:"page_ColorConvert__7VIoI",ColorSelect:"page_ColorSelect__nUc8H",Color:"page_Color__ya5K5",ImageZone:"page_ImageZone__PkBlf",Values:"page_Values__mm5vZ",Canvas:"page_Canvas__EOoli",CodeBlock:"page_CodeBlock__7_Pgq",Canvases:"page_Canvases__5m9cA",Starter:"page_Starter__FE66H",Description:"page_Description__64yKG",Quantizer:"page_Quantizer__dvOdS",QuantizeColor:"page_QuantizeColor__H4TS9",PickerContainer:"page_PickerContainer__LOs_I",QuantizeOutput:"page_QuantizeOutput__Nxqhh",Tip:"page_Tip__QiWQz",DownArrow:"page_DownArrow__UDRyL",ZoneName:"page_ZoneName__phrJJ",DropMessage:"page_DropMessage__lNFE8",Loading:"page_Loading__k4mIw",Spinner:"page_Spinner__AQC8Q",spin:"page_spin__OXxwq",DropRoot:"page_DropRoot__Q5OMd",Blocker:"page_Blocker__rPLYP",UnblockButton:"page_UnblockButton__LgsPm"}},5110:function(e){e.exports={Container:"ColorSlider_Container__fbcvW",RangeTrack:"ColorSlider_RangeTrack__k6ZoD",Indicator:"ColorSlider_Indicator__ZutBx"}}},function(e){e.O(0,[839,947,467,491,79,115,364,744],function(){return e(e.s=7286)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index ce4ea9a..a4d0bda 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -turbo-colormap: A TypeScript library for working with the Turbo colormap

turbo-colormap

A TypeScript library for working with Turbo, an improved rainbow colormap for visual­ization. Turbo is often used for depth maps. This library includes the ability to “uncolormap” Turbo, converting values back to normalized floats or grayscale intensities. In addition to the library, you can also use this demo page to perform quick color and image conversions.

This library generates more faithful values than the d3 approx­imation of Turbo found in d3-scale-chromatic.

See the README on GitHub.

npm install turbo-colormap

color converter

Two-way conversion between grayscale intensity and Turbo.

normalized:
0.647058824
rgb:
rgb(165, 165, 165)
hex:
#a5a5a5
normalized:
0.647058824
rgb:
rgb(244, 196, 58)
hex:
#f4c43a

image converter

Some tools expect grayscale depth maps. Load images into the area below to convert between grayscale and Turbo images. Conversion is done client-side; all data stays in your browser.

tap or drag & drop Turbo image

tap or drag & drop grayscale image

This demo will consume a little CPU and needs to be enabled first.

nearest color

Snap arbitrary colors to the indexed Turbo palette. This can yield surprising results with much of the sRGB color space; it’s mostly useful for interpreting visual­izations exported with an approx­imation of Turbo or a lossy format like JPEG, where the colors won’t be in the Turbo lookup table.

The nearest color is determined by simple Euclidian distance using a k-d tree.

Wanna say thanks?

Buy Me A Coffee
Wanna do fancy stuff on the Web?
I’m available for consulting, just get in touch!
\ No newline at end of file +turbo-colormap: A TypeScript library for working with the Turbo colormap

turbo-colormap

A TypeScript library for working with Turbo, an improved rainbow colormap for visual­ization. Turbo is often used for depth maps. This library includes the ability to “uncolormap” Turbo, converting values back to normalized floats or grayscale intensities. In addition to the library, you can also use this demo page to perform quick color and image conversions.

This library generates more faithful values than the d3 approx­imation of Turbo found in d3-scale-chromatic.

See the README on GitHub.

npm install turbo-colormap

color converter

Two-way conversion between grayscale intensity and Turbo.

normalized:
0.647058824
rgb:
rgb(165, 165, 165)
hex:
#a5a5a5
normalized:
0.647058824
rgb:
rgb(244, 196, 58)
hex:
#f4c43a

image converter

Some tools expect grayscale depth maps. Load images into the area below to convert between grayscale and Turbo images. Conversion is done client-side; all data stays in your browser.

tap or drag & drop Turbo image

tap or drag & drop grayscale image

This demo will consume a little CPU and needs to be enabled first.

nearest color

Snap arbitrary colors to the indexed Turbo palette. This can yield surprising results with much of the sRGB color space; it’s mostly useful for interpreting visual­izations exported with an approx­imation of Turbo or a lossy format like JPEG, where not every pixel will be in the Turbo lookup table.

The nearest color is determined by simple Euclidian distance using a k-d tree.

Wanna say thanks?

Buy Me A Coffee
Wanna do fancy stuff on the Web?
I’m available for consulting, just get in touch!
\ No newline at end of file diff --git a/docs/index.txt b/docs/index.txt index ec11e54..e29f445 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1,8 +1,8 @@ -3:I[2817,["947","static/chunks/57243224-05984c2d75228c8d.js","467","static/chunks/75daf03c-a0f7eedcc4c17049.js","491","static/chunks/d8d4a831-10bef37d95d95755.js","79","static/chunks/79-dc62408d0c208980.js","931","static/chunks/app/page-fec68a5577a2e826.js"],"ColorConvert"] -4:I[2817,["947","static/chunks/57243224-05984c2d75228c8d.js","467","static/chunks/75daf03c-a0f7eedcc4c17049.js","491","static/chunks/d8d4a831-10bef37d95d95755.js","79","static/chunks/79-dc62408d0c208980.js","931","static/chunks/app/page-fec68a5577a2e826.js"],"ImageConvert"] -5:I[2817,["947","static/chunks/57243224-05984c2d75228c8d.js","467","static/chunks/75daf03c-a0f7eedcc4c17049.js","491","static/chunks/d8d4a831-10bef37d95d95755.js","79","static/chunks/79-dc62408d0c208980.js","931","static/chunks/app/page-fec68a5577a2e826.js"],"Quantizer"] +3:I[2817,["947","static/chunks/57243224-05984c2d75228c8d.js","467","static/chunks/75daf03c-a0f7eedcc4c17049.js","491","static/chunks/d8d4a831-10bef37d95d95755.js","79","static/chunks/79-dc62408d0c208980.js","931","static/chunks/app/page-a093ff4dc3a3e529.js"],"ColorConvert"] +4:I[2817,["947","static/chunks/57243224-05984c2d75228c8d.js","467","static/chunks/75daf03c-a0f7eedcc4c17049.js","491","static/chunks/d8d4a831-10bef37d95d95755.js","79","static/chunks/79-dc62408d0c208980.js","931","static/chunks/app/page-a093ff4dc3a3e529.js"],"ImageConvert"] +5:I[2817,["947","static/chunks/57243224-05984c2d75228c8d.js","467","static/chunks/75daf03c-a0f7eedcc4c17049.js","491","static/chunks/d8d4a831-10bef37d95d95755.js","79","static/chunks/79-dc62408d0c208980.js","931","static/chunks/app/page-a093ff4dc3a3e529.js"],"Quantizer"] 6:I[1742,[],""] 7:I[9121,[],""] -2:T518,M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z8:T518,M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z0:["FJvtvnjf3bKxMO8SYQRcW",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",[["$","header",null,{"children":[["$","h1",null,{"children":"turbo-colormap "}],["$","a",null,{"href":"https://github.com/exogen/turbo-colormap","children":["$","svg",null,{"stroke":"currentColor","fill":"currentColor","strokeWidth":"0","viewBox":"0 0 496 512","className":"icon","children":["$undefined",[["$","path","0",{"d":"$2","children":[]}]]],"style":{"color":"$undefined"},"height":"1em","width":"1em","xmlns":"http://www.w3.org/2000/svg"}]}]]}],["$","p",null,{"children":["A TypeScript library for working with"," ",["$","a",null,{"href":"https://research.google/blog/turbo-an-improved-rainbow-colormap-for-visualization/","children":"Turbo"}],", an improved rainbow colormap for visual­ization. Turbo is often used for depth maps. This library includes the ability to “uncolormap” Turbo, converting values back to normalized floats or grayscale intensities. In addition to the library, you can also use this demo page to perform quick color and image conversions."]}],["$","p",null,{"children":["This library generates more faithful values than the d3 approx­imation of Turbo found in"," ",["$","a",null,{"href":"https://github.com/d3/d3-scale-chromatic","children":"d3-scale-chromatic"}],"."]}],["$","div",null,{"className":"page_Starter__FE66H","children":[["$","p",null,{"children":["See the"," ",["$","a",null,{"href":"https://github.com/exogen/turbo-colormap","children":"README on GitHub"}],"."]}],["$","p",null,{"className":"page_CodeBlock__7_Pgq","children":["$","code",null,{"children":"npm install turbo-colormap"}]}]]}],["$","section",null,{"children":[["$","h2",null,{"children":["$","em",null,{"children":"color converter"}]}],["$","p",null,{"className":"page_Description__64yKG","children":"Two-way conversion between grayscale intensity and Turbo."}],["$","$L3",null,{}]]}],["$","section",null,{"children":[["$","h2",null,{"children":["$","em",null,{"children":"image converter"}]}],["$","p",null,{"className":"page_Description__64yKG","children":"Some tools expect grayscale depth maps. Load images into the area below to convert between grayscale and Turbo images. Conversion is done client-side; all data stays in your browser."}],["$","$L4",null,{}]]}],["$","section",null,{"children":[["$","h2",null,{"children":["$","em",null,{"children":"nearest color"}]}],["$","p",null,{"className":"page_Description__64yKG","children":"Snap arbitrary colors to the indexed Turbo palette. This can yield surprising results with much of the sRGB color space; it’s mostly useful for interpreting visual­izations exported with an approx­imation of Turbo or a lossy format like JPEG, where the colors won’t be in the Turbo lookup table."}],["$","p",null,{"className":"page_Description__64yKG","children":"The nearest color is determined by simple Euclidian distance using a k-d tree."}],["$","$L5",null,{}]]}]],[["$","link","0",{"rel":"stylesheet","href":"/turbo-colormap/_next/static/css/1a71d42b5e4771d9.css","precedence":"next","crossOrigin":"$undefined"}]]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/turbo-colormap/_next/static/css/79d670358bd86bcc.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_42c616","children":["$","body",null,{"children":[["$","main",null,{"children":["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}],["$","footer",null,{"children":[["$","div",null,{"className":"thanks","children":[["$","p",null,{"children":"Wanna say thanks?"}],["$","a",null,{"href":"https://www.buymeacoffee.com/mosswood","target":"_blank","children":["$","img",null,{"width":217,"height":60,"src":"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt":"Buy Me A Coffee"}]}]]}],["$","div",null,{"className":"consulting","children":["Wanna do fancy stuff on the Web?",["$","br",null,{}],"I’m available for consulting, just"," ",["$","a",null,{"href":"https://brianbeck.com","children":"get in touch!"}]]}],["$","nav",null,{"children":["$","ul",null,{"children":[["$","li",null,{"children":["$","a",null,{"href":"https://hachyderm.io/@exogen","rel":"noopener","aria-label":"exogen on Hachyderm","title":"exogen on Hachyderm","children":["$","svg",null,{"stroke":"currentColor","fill":"currentColor","strokeWidth":"0","viewBox":"0 0 448 512","className":"icon","children":["$undefined",[["$","path","0",{"d":"M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5zm-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z","children":[]}]]],"style":{"color":"$undefined"},"height":"1em","width":"1em","xmlns":"http://www.w3.org/2000/svg"}]}]}],["$","li",null,{"children":["$","a",null,{"href":"https://github.com/exogen","rel":"noopener","aria-label":"exogen on GitHub","title":"exogen on GitHub","children":["$","svg",null,{"stroke":"currentColor","fill":"currentColor","strokeWidth":"0","viewBox":"0 0 496 512","className":"icon","children":["$undefined",[["$","path","0",{"d":"$8","children":[]}]]],"style":{"color":"$undefined"},"height":"1em","width":"1em","xmlns":"http://www.w3.org/2000/svg"}]}]}]]}]}]]}]]}]}]],null],null],["$L9",null]]]] +2:T518,M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z8:T518,M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z0:["5KBG7e5Qfr8Cb-zKKQA_Q",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",[["$","header",null,{"children":[["$","h1",null,{"children":"turbo-colormap "}],["$","a",null,{"href":"https://github.com/exogen/turbo-colormap","children":["$","svg",null,{"stroke":"currentColor","fill":"currentColor","strokeWidth":"0","viewBox":"0 0 496 512","className":"icon","children":["$undefined",[["$","path","0",{"d":"$2","children":[]}]]],"style":{"color":"$undefined"},"height":"1em","width":"1em","xmlns":"http://www.w3.org/2000/svg"}]}]]}],["$","p",null,{"children":["A TypeScript library for working with"," ",["$","a",null,{"href":"https://research.google/blog/turbo-an-improved-rainbow-colormap-for-visualization/","children":"Turbo"}],", an improved rainbow colormap for visual­ization. Turbo is often used for depth maps. This library includes the ability to “uncolormap” Turbo, converting values back to normalized floats or grayscale intensities. In addition to the library, you can also use this demo page to perform quick color and image conversions."]}],["$","p",null,{"children":["This library generates more faithful values than the d3 approx­imation of Turbo found in"," ",["$","a",null,{"href":"https://github.com/d3/d3-scale-chromatic","children":"d3-scale-chromatic"}],"."]}],["$","div",null,{"className":"page_Starter__FE66H","children":[["$","p",null,{"children":["See the"," ",["$","a",null,{"href":"https://github.com/exogen/turbo-colormap","children":"README on GitHub"}],"."]}],["$","p",null,{"className":"page_CodeBlock__7_Pgq","children":["$","code",null,{"children":"npm install turbo-colormap"}]}]]}],["$","section",null,{"children":[["$","h2",null,{"children":["$","em",null,{"children":"color converter"}]}],["$","p",null,{"className":"page_Description__64yKG","children":"Two-way conversion between grayscale intensity and Turbo."}],["$","$L3",null,{}]]}],["$","section",null,{"children":[["$","h2",null,{"children":["$","em",null,{"children":"image converter"}]}],["$","p",null,{"className":"page_Description__64yKG","children":"Some tools expect grayscale depth maps. Load images into the area below to convert between grayscale and Turbo images. Conversion is done client-side; all data stays in your browser."}],["$","$L4",null,{}]]}],["$","section",null,{"children":[["$","h2",null,{"children":["$","em",null,{"children":"nearest color"}]}],["$","p",null,{"className":"page_Description__64yKG","children":"Snap arbitrary colors to the indexed Turbo palette. This can yield surprising results with much of the sRGB color space; it’s mostly useful for interpreting visual­izations exported with an approx­imation of Turbo or a lossy format like JPEG, where not every pixel will be in the Turbo lookup table."}],["$","p",null,{"className":"page_Description__64yKG","children":"The nearest color is determined by simple Euclidian distance using a k-d tree."}],["$","$L5",null,{}]]}]],[["$","link","0",{"rel":"stylesheet","href":"/turbo-colormap/_next/static/css/1a71d42b5e4771d9.css","precedence":"next","crossOrigin":"$undefined"}]]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/turbo-colormap/_next/static/css/79d670358bd86bcc.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_42c616","children":["$","body",null,{"children":[["$","main",null,{"children":["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}],["$","footer",null,{"children":[["$","div",null,{"className":"thanks","children":[["$","p",null,{"children":"Wanna say thanks?"}],["$","a",null,{"href":"https://www.buymeacoffee.com/mosswood","target":"_blank","children":["$","img",null,{"width":217,"height":60,"src":"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt":"Buy Me A Coffee"}]}]]}],["$","div",null,{"className":"consulting","children":["Wanna do fancy stuff on the Web?",["$","br",null,{}],"I’m available for consulting, just"," ",["$","a",null,{"href":"https://brianbeck.com","children":"get in touch!"}]]}],["$","nav",null,{"children":["$","ul",null,{"children":[["$","li",null,{"children":["$","a",null,{"href":"https://hachyderm.io/@exogen","rel":"noopener","aria-label":"exogen on Hachyderm","title":"exogen on Hachyderm","children":["$","svg",null,{"stroke":"currentColor","fill":"currentColor","strokeWidth":"0","viewBox":"0 0 448 512","className":"icon","children":["$undefined",[["$","path","0",{"d":"M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5zm-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z","children":[]}]]],"style":{"color":"$undefined"},"height":"1em","width":"1em","xmlns":"http://www.w3.org/2000/svg"}]}]}],["$","li",null,{"children":["$","a",null,{"href":"https://github.com/exogen","rel":"noopener","aria-label":"exogen on GitHub","title":"exogen on GitHub","children":["$","svg",null,{"stroke":"currentColor","fill":"currentColor","strokeWidth":"0","viewBox":"0 0 496 512","className":"icon","children":["$undefined",[["$","path","0",{"d":"$8","children":[]}]]],"style":{"color":"$undefined"},"height":"1em","width":"1em","xmlns":"http://www.w3.org/2000/svg"}]}]}]]}]}]]}]]}]}]],null],null],["$L9",null]]]] 9:[["$","meta","0",{"name":"viewport","content":"width=320, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"turbo-colormap: A TypeScript library for working with the Turbo colormap"}],["$","meta","3",{"name":"next-size-adjust"}]] 1:null