title: preserving colors in write command
body: <p>I'm using the write command to send messages to friends , I made a simple script that turns the text we give into ASCII art as follows:</p>
  
  <p><strong>ascii.py</strong></p>
  
  <pre><code>import pyfiglet
  from termcolor import cprint
  import sys,random
  f,t = '',''
  fonts = list(pyfiglet.FigletFont.getFonts())
  if sys.argv[-1] in fonts:
      f = sys.argv[-1]
      t = sys.argv[1:-1]
  else:
      f = random.choice(fonts)
      t = sys.argv[1:]
  cprint(pyfiglet.figlet_format(' '.join(t),str(f)),'red','on_blue',['bold'])
  print(t)
  </code></pre>
  
  <p>Then I use the following command to send message:</p>
  
  <pre><code>python ascii.py hi graffiti | write neo
  </code></pre>
  
  <p>when I run the run the command without pipe i.e., <code>python ascii.py hi graffiti</code>, I get the following output:</p>
  
  <p><a href="https://i.stack.imgur.com/MGtdf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MGtdf.png" alt="enter image description here"></a></p>
  
  <p>But when I run <code>python ascii.py hi graffiti | write neo</code> , the colors are not being displayed instead some extra characters are being displayed as show below:</p>
  
  <p><a href="https://i.stack.imgur.com/syiZy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/syiZy.png" alt="enter image description here"></a></p>
  
  <p>so how do I preserve colors so that they reach to the person at other end??</p>