Changing text colour, changes text box size

I have a text that every time I change the colour (by selecting a new colour from my external library), it changes the size of the text box.
Does anyone now why this could be happening?
Thanks