refactor the sed_command in _color functions