But maybe that is the whole point of the matter: The moment it gets converted to a “unstructured/unconstrained” RBG format, you lose the information that it was actually a limited set of classes he wanted to represent. The backend you make a guess that your using a limited number of colors, but how would it know it just didn’t happen to work out that way.
The correct way to do it should be to supply the data and palette separately. I created a quick PR to achieve this, see:
It seems to work.
Ideally it should then be tied to FileIO, but I’m not sure how to do that.