If I use the example in your video with your function color_title:
labels = ["What's Good for the ", "Goose", " is good for the ", "Gander."]
colors = ['black', 'C1', 'black','C2']
color_title(labels, colors)
The blank at the end of the 1st label, blank at the beginning of the 3rd label, and blank at the end of the 3rd label are removed by color_title.