Sort swatches by usage [suggestion]

Hello,

Could there please be the possibility to sort the palette based on the colors’ frequency (in the Sort & Gradients menu) – a.k.a how many pixels every color has?

This would allow users to have their most used colors of an indexed artwork on the top of their palette.

3 Likes

I’m boosting your demand as I was typing the exact same suggestion before noticing you already did!

With such a feature we could immediately see which color is not used enough and doesn’t justify wasting a slot + can be replaced by another.

When I’m making 16-color palette limited SEGA Genesis graphics, it’s crucial to have optimized palettes!

Currently, when making a piece, I’m checking by magicwanding/bucketting colors I suspect but it’s a bit tedious.

Hey there, thanks for reminding me of this ancient post!

Since the idea was never addressed by @dacap, let’s refresh it:) What do you think David, could this be done?

1 Like

Hi there! it looks like a good idea and maybe not so hard to implement! Taking note (not sure for v1.2.19 because we want to release it ASAP)

1 Like

In the meantime I discovered this Pixeljoint related tool. It kinda covers my needs but it could still be nicer to have it within Aseprite (in order not to rely on an online external tool and to have a more comfortable workflow).

Here is the link:
http://yanrishatum.ru/pj/

As you can see, not only does it gives color percentage of use (and allows you to sort them), it cleverly highlights the pixels that use so they are easier to spot!

That tool is awesome! The highlighting feature is something i never knew i needed. I really hope this can make it into the program.

1 Like

So inspired by this feature request I wrote a script that does that:

It totally breaks images with Indexed Color Mode so you’d need to use It in RGB Color Mode. At least change color mode, sort palette, and then swap back to Indexed, I’d do this in a script but Color Mode information seems to be read-only, @dacap?

3 Likes

I think you should be able to use app.command.ChangePixelFormat() to change color modes (params are not document yet in the api repo). Anyway I’ll create an issue to make the “remap” feature available from scripts (or after a script that modifies the palette is executed).

3 Likes

Thanks a lot - this works, I can add the final polish to this script now. :slight_smile:

1 Like

I like the idea for this feature/script more and more, I added an option to replace every color.
Work with every Color Mode and you can reset colors to their original values.

2 Likes

Wow awesome work, i like it a lot!

I have no idea how scripts and extensions work in terms of licensing, but if you and dacap were able to cooperate to bring this into aseprite as a native feature, that would’ve been great :clap:

I don’t think @dacap needs any help in implementing such features into Aseprite and will do much better job than I did. :sweat_smile: For now, if anyone is interested in testing this It’s available in my NxPA Studio extension.

1 Like

Hi there! The feature itself is not hard to implement (it just an histogram of used indexes). I’m thinking some different features:

  1. One in the Sort & Gradients popup menu to sort indexes by usage
  2. Other special dialog to recolor the whole image, still thinking what would be a good interface of this, actually modifying the palette already do the job in indexed images, but it would be nice to have the same option in RGB or grayscale, so it looks like an extension of the color bar itself
  3. A way to see the histogram of RGBA, or HSVA, or HSLA values too (and even recolor modifying the histogram range)
2 Likes