mwg API
    Preparing search index...

    Type Alias PaletteRemapMode

    PaletteRemapMode: "exact" | "nearest"

    How a pixel that is not an exact from colour is treated. 'exact' (the default for remapPixels/recolorTexture) leaves it untouched - the correct behaviour for a discrete swap like ~RC/~PAL, and for a paletteRangeMapping over a reference palette, where the pixels that are not in the palette are the ones the artists deliberately left alone (shading, outlines, anti-aliased edges). 'nearest' repaints every opaque pixel with whichever from entry it is closest to, which is what a palette that covers the whole image wants - a dense generated ramp where every pixel is meant to be recoloured. Using 'nearest' with a sparse from list (an ~RC pair or two, a three-colour reference palette) repaints the entire image toward whichever entry happens to be closest, which is the bug this mode exists to prevent.