Octree palette maker is not putting colors in order

so i noticed when samplling from a bigger palette and shinking it down and organizing tigly when i went to “create palette from current image” it picked completely wrong but it does persist it doest change if i try it again

how it shoud be

how it is
i did deleted the black swap[

but when i use the Table RBG 5 bits + Alpha 3 bits it works just fine,

keep in mind that we are not using a huge amount of swaps its 128 which is less than the amount that the Table method gets in trouble

hello is anybody there?

Hi @Ethan_Buttazzi, I just saw this bug report. The issue with octree is that it keep colors internally organized in a tree like structure, already ordered by values (not by the order they were found).

just a thoguht here i dont even know if its possible but, would it be possible to make the octree pick the correct colors, and them pass the rbg 5 bits + alpha method to correct in the correct order using a index method in an internal image?

if its plausible ill try to do a script.