title: Testing for color support in Linux shell scripts
body: <p>This is the second time I've wanted to do this and again my google-fu has failed me.</p>
  
  <p>When in the course of running a shell script (in my case a bash script) is there a program/script that tests whether the current shell supports color?</p>
  
  <p>Alternatively is there a way to take the terminal type and easily determine if it supports color?</p>
  
  <p>Either way it would be helpful.</p>