How to have tail -f show colored output

In the morning, I saw a friend curl a weather forecast HTTP resource on the shell terminal and found that the output text is colored, which inspired my interest in outputting colored text logs in the terminal to enhance readability.