Since you are not only colorizing the diff output, maybe call this function process_diff_output?