<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def color_diffs(string):
 """ Add color ANSI codes for diff lines. Purpose: Adds the ANSI/win32 color coding for terminal output to output | produced from difflib. @param string: The string to be replacing @type string: str @returns: The new string with ANSI codes injected. @rtype: str """

    string = string.replace('--- ', color('--- ', 'red'))
    string = string.replace('\n+++ ', color('\n+++ '))
    string = string.replace('\n-', color('\n-', 'red'))
    string = string.replace('\n+', color('\n+'))
    string = string.replace('\n@@ ', color('\n@@ ', 'yel'))
    return string