Added color transformation function