Espen,
please provide the complete mapfile and actual palette file that were
used for the images you produced.
looking at the code there's no reason another color should be picked
if it was provided in the palette file, so either you're doing
something wrong in your mapfile/palette combination, eit
What you are doing is a "95%" solution. What you are actually missing is
that if you use images in symbols, that these are not covered by the
colors in the mapfile and it is possible that the colors on the symbols
may shift. If you do not see any issue with that then you are probably ok.
-Stev
Is this the only way to make it work correctly? It seems a lot easier
to extract all the RGB colors we use from the map file and add that to
the palette file? That is what we have done now, and it will be a lot
more work to actually extract the colors from all the different map
images we then have