Originally I used pacman, not pacman-color and I copied the output into a file and I displayed the output in the terminal with the following command :
pacman -Syu | tee file.log
Unfortunately, it seems that pacman-color detects that the output is sent to a pipe and it deactives the colored output.
So my question is how to force pacman-color to display a colored output even if the output is sent to a pipe? As with yaourt :
yaourt -Syu --color | tee file.log
Or maybe there is a way to do it without using pipe or tee?