[Script] Palettize: Better control when applying a palette

Hi all,

I have a feature request out for this, but thought I would give it a go myself with a script. Here is a script that allows you some better control when applying a palette to your image. Currently it’s designed to load in an image, then run the script to “palettize” it. I haven’t really thought about supporting multiple frames or layers yet.

It allows you to load a palette and then preview your image with that palette applied. You can adjust HSV sliders until you are happy with the mapping before applying it.

I plan to add more adjustment options - specifically I’d like to be able to adjust color channels separately. There are many cases when blues map to greens, for example, so I’d like to tweak just the green channel to get a better mapping.

Script is available here: https://github.com/projectitis/aseprite-script-palettize

It’s V1, so be nice :slight_smile:

3 Likes

Now added the ability to adjust color channels individually for better control. For example, if the image is matching too many reds, select the red channel and bring down the saturation, and those colors will start to match browns or other colors.

1 Like

I have now added the last feature I wanted: Exclusions.

If you see a weird color being matched when you are palettizing, simply click the weird color and an exclusion rule will be added.

This prevents the underlying color from matching that palette color. It has a 10% tolerance (currently not adjustable) so that similar colors will not match that palette color either.

Click the exclusion rule to remove it again.

Example

Here I am matching this Kingfisher to a palette. I don’t like how the orange of the belly is matching the same purple hue as the background. I want to create a new exclusion rule to exclude that specific match.

I click the belly of the kingfisher on one of the purples pixel that I don’t want to match to the orange below. It adds an exclusion rule, and will then match that underlying color to the next closest palette match instead.

The exclusion swatch is two colors with a cross between them. It means “If you see this top color, do not match it to the bottom color”.

You can click any exclusion to remove it again.

p.s. While I was at it I also added the ability to select the scale of your preview images :slight_smile:

1 Like