A chat message formatted with the '§' color codes will lose its color when it goes to a new line.
In both screenshots, the raw message was "§4this is a test". On one image the chat width was big enough to fit the message in one line. On the second one, I made it smaller to make it go to a new line, which made the word "test" reset its formatting.
I am aware that the recommended way to format text is using the JSON format, but many servers still use this system, since it is the easiest way for a human to write colored text without having to use the more complicated JSON format.
Confirmed - I'm pretty sure this has been the way it is for ages though.