Fix incorrectly printing colour when grayscale is requested