I’ve been trying to convert RGB images into indexed ones, but the algorithm seems to have difficulty mapping dark colors. I realized it was saving the first index as transparent, but, even adding black as an additional color (when it was the “first” transparent color), it still seems to favor high saturation colors like dark blue that look odd (perhaps a bias based on percent over absolute color difference). Does anyone have any tips or hacks to handle this that I might be missing? Thanks!
Would you mind posting some example images?
I’ve seen the problem you describe before firsthand, and threads about palette matching have been made before, such as https://community.aseprite.org/t/converting-to-index-color-gives-incorrect-results . Aside from making sure that a transparent color, clear black, is at palette index 0, which you mentioned, I don’t have a lot of other decent ideas.
I’ve found that matching in a different color space, such as LAB, can improve the results, but not always.
Manually replacing problem colors with a tolerance might help, but would be tedious. Again, if available, use a color replace function based in LAB, not RGB.
I initially thought that a Floyd-Steinberg might help, but with the Aseprite built-in match it didn’t.
Calm 48 palette.
Aseprite’s built-in match.
Custom match using a Lua script, SR LAB 2 and a cylindrical distance metric.
Krita, LAB space.