BUGFIX: colouring functions do not modify input

I've updated both colouring functions to leave the input data unchanged.