palette-shader

GitHub

A dependency-free WebGL2 shader that visualizes a color palette by mapping a color space onto a plane, polar wheel, or interactive 3D solid, then snapping each pixel to the nearest palette color. Toggle the 3D view to explore the full color space as a rotatable cube or cylinder — drag to orbit and use the position slider to slice into the volume. Supports 30+ color models and eleven distance metrics, all running entirely on the GPU.