How to get color output from SSH command

Yes, it is possible using -tt switches, which will force TTY allocation and it will trick the remote program to write also the colors. Minimal test I can run on my system:

Without colors:

ssh localhost "cowsay hello | lolcat"

With colors:

ssh -tt localhost "cowsay hello | lolcat"