The conversion of hematin to bile pigment.