public function getColorCode($color)
    {
        if (!$this->enabled) {
            return '';
        }
        if (!isset($this->colors[$color])) {
            throw new Exception("No such color $color");
        }

        return $this->colors[$color];
    }
public function getColorCode($color)
    {
        if (!$this->enabled) {
            return '';
        }
        if (!isset($this->colors[$color])) {
            throw new Exception("No such color $color");
        }

        return $this->colors[$color];
    }
public function getColorCode ( $ color ) { if ( ! $ this -> enabled ) { return '' ; } if ( ! isset ( $ this -> colors [ $ color ] ) ) { throw new Exception ( "No such color $color" ) ; } return $ this -> colors [ $ color ] ; }
Gets the appropriate terminal code for the given color

@param string $color one of the available color names
@return string color code
@throws Exception
Gets the appropriate terminal code for the given color