i am not 100 % sure what the text file you attached should be
98 colors are not in the ufo-battlescape pallette and 235 colors are not in the tftd depth0 palette
could you attach something like the ReindexPalette.csv.txt from (
https://openxcom.org/forum/index.php?topic=2327.msg24330#msg24330) if you have a new conversion
i put the terrain data against the conversion data mentioned above and my manual conversion
left=original,middle your (old?) automatic conversion, right=my manual conversion
on the palcomp2-image the autoconversion has again slightly better colors (floor, terrain=dirtstuff) but strange errors/spots that need fixing (doors, dinertable,..)
on the palcomp3-image (sea terrain) my conversion fails big time yours is not perfect but usable
the great thing is one could create different conversions and pick the best (the resulting conversion use of course the same palette)
at the moment i think:
for the weapons the change "green base to light brown" was better - but perhaps for sea or island-dirtstuff your indexing is better - who knows - we can just generate both and let the user/modder decide whats best
"What is the index of trasparent color in the UFO palette ?"
index0=transparent for all gifs i produce
also all ufo-act files i have also have pink as index0 color i set it to [0,0,0] but i have no idea if thats "original"