[Extension] Palette Utils

Palette Utils is a bunch of simple tools for creating and optimising palettes.

Find it in menu at Palette OptionsPalette Utils…

Note: only been tested with v1.3-beta so that may be a requirement, not much testing in RGB mode so that might be broken in places.

Tools:

  • Select Indices
    • Similar: select indices within distance of selected indices using the Distance Metric, Colour Space, Similarity Threshold and Component Scale
    • Duplicates: select indices containing duplicate colours
    • Below Usage Threshold: select indices used in fewer than Usage Threshold pixels
    • Least Used: select the Least Used Count least used indices
    • Invert Selection: inverts index selection
    • Select Pixels: selects pixels matching selected indices
  • Remove Indices
    • Replace With Nearest: removes the indices from the palette, replacing matching pixels with the nearest remaining index using the Distance Metric, Colour Space and Component Scale
    • Replace With Colour: removes the indices from the palette, replacing matching pixels with the Replacement Colour
    • Unused: removes indices not used by any pixels
    • Duplicates: removes indices containing duplicate colours
  • Merge Indices
    • Selected: merges selected indices using the Merge Mode
    • Similar: merges indices similar to the selected indices using the Merge Mode, Distance Metric, Colour Space, Similarity Threshold and Component Scale
  • Ramps
    • Interpolate: interpolates selected indices between first index colour and last index colour using the Colour Space and Interpolation Mode
    • Spline: interpolates indices between colours of successive pairs of selected indices using the Colour Space and Interpolation Mode
    • Resize: resize ramp to Ramp Size interpolating colours using the Colour Space
    • Reverse: reverses ramp order
  • Add Indices
    • Unique Pixels: add indices for each unique colour in pixel selection
    • All Pixels: add indices for all pixels in selection
    • Grid Centres: add indices for each pixel at grid centres within selection
    • Weighted Average: adds a single index containing the weighted average colour of all selected pixels
  • Misc.
    • Count Colours Used: shows the number of colours used in selection
    • Count Pixels Used: shows the number of pixels matching selected indices in selection
    • Measure Distance: shows the maximum distance between selected indices using the Distance Metric, Colour Space and Component Scale
    • Histogram: shows an index usage histogram

5 Likes

hi, thanks for this great extension! i didn’t play with it too much, but i already noticed few things:

  • when i click on replacement colour the console output window jumps out and gets in the way, i don’t think it’s needed?
  • in rgb mode remove and merge indices change the image colours. i don’t know if it’s intentional, but it would be nice to have an option to prevent this behaviour as it may not be desirable.
  • remove unused in indexed mode removes the transparency index too, which aseprite requires even if there’s no transparency.
  • select pixels always creates selection with position at 0,0 (and occasionally ignores first vertical line or its part) even if cel image is in different location than 0,0
  • count pixels doesn’t give proper number