I have several segmented pictures, each picture has a list with 2 objects list[\'Object1\',\'Object2\']. So I used this code to do the color of images:
import