Moved colour utility, which is only used for plotting, to plotting.
Added cast.