added some code to support colour remaps (not yet done)