moved getting of colour into test for visibility, crashed if no colourmap