Colors\Color::isSupported PHP Method

isSupported() public method

Colorization is disabled if not supported by the stream: - Windows without Ansicon, ConEmu or Babun - non tty consoles
public isSupported ( ) : boolean
return boolean true if the stream supports colorization, false otherwise
    public function isSupported()
    {
        if (DIRECTORY_SEPARATOR == '\\') {
            return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || false !== getenv('BABUN_HOME');
        }
        return false !== getenv('BABUN_HOME') || function_exists('posix_isatty') && @posix_isatty(STDOUT);
    }