turbo-colormap: A TypeScript library for working with the Turbo colormap

submited by
Style Pass
2024-10-14 21:00:02

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.

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.

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.

Leave a Comment