Added better error handling to the colour mapping tool for RGB images