Palette Quantiser
object PaletteQuantiser
Maps a raster onto a Palette: each pixel at least half opaque takes the palette colour nearest to it in OKLab, the first on a tie, written as a palette label (index plus one); every other pixel is 0, background. How a reference photo becomes something an indexed sprite can hold.