Converting to index color gives incorrect results

Hi, I love the program but I’ve got a problem with the 1.2.9 I currently have. When I bring in art from another program, make a palette from the art, and then downsample to index color the colors chosen aren’t always the correct ones even if they exist in the palette. I think this can be reproduced easily.

-Make a new document (rgb).
-Put two colors down but make them only one or two integers apart in one channel.
-Make palette from image (should end up having only have three entries with the background color).
-Convert to Index color.

At this point Aseprite will just make both strokes the same color of one of the palette colors even though the palette contains both colors.

This is kind of a big problem because I have a habit of making images in other programs sometimes and am losing info when I try to bring them over. I’d appreciate any help or advice about a different process or setting I could use.

1 Like

Well if anyone reads this could you take a sec to check if you can even re-create this behavior? I’d really like to know if it’s the program or if I’ve just been slipped the crazy pills.

Yup. If I draw two lines where one is #527b2e (82,107,46) while the other one is #526a2f (82, 106, 47), then make sure both are in the palette and switch to indexed mode they both become #526b2e.

I have no idea why this is the case. All I can think of is that either it’s a bug, or it’s working as intended and the indexed limitation causing this (or warranting this behavior) exists within the file types somehow.

I’ve to check some issues converting RGB -> Indexed (even more, replacing the whole algorithm to generate palettes from RGB images). So it’s something with high priority.

I’ve found the previous issue reporting this:

Thanks for posting here.

Can I make a suggestion, if there’s going to be a different system can there be an option for an exact mode? By that I mean the function would just be two loops where for each pixel of the document, it checks every pixel of the palette, and if an exact match is found then it’s accepted and if it isn’t then instead of choosing the next best color it actually stops the process and alerts the user?

Those of us who get really anal about colors would appreciate it.

1 Like

So it’s been about a year since I posted this, although it’s been 2 and a half years since someone made this other thread…

I tried the latest patches and I’m glad to see all the other bug fixes and features but I’m still getting the issue here. Is this something that is on the radar at all or should I stop worrying about it?

I feel the need to ask because I still find myself having to double-check doodles that I might start in Photoshop or something when I want to turn them into something more orderly in Aseprite.