Until your program is run in a emacs window (lint-staged’s progress bars mess up magit’s output buffer, making it really difficult to figure out what the problem is) or is piped through grep.
tput will do the right thing because of terminfo, hand-coded escape sequences will make someone curse you.