implement color transfer algorithm