public static function hasColorSupport(): bool
    {
        if (DIRECTORY_SEPARATOR === '\\') {
            $winColor = Env::get('ANSICON', Env::VAR_BOOL)
                || 'ON' === Env::get('ConEmuANSI')
                || 'xterm' === Env::get('TERM');

            return $winColor;
        }

        if (!defined('STDOUT')) {
            return false;
        }

        return self::isInteractive(STDOUT);
    }
public static function hasColorSupport(): bool
    {
        if (DIRECTORY_SEPARATOR === '\\') {
            $winColor = Env::get('ANSICON', Env::VAR_BOOL)
                || 'ON' === Env::get('ConEmuANSI')
                || 'xterm' === Env::get('TERM');

            return $winColor;
        }

        if (!defined('STDOUT')) {
            return false;
        }

        return self::isInteractive(STDOUT);
    }
public static function hasColorSupport ( ) : bool { if ( DIRECTORY_SEPARATOR === '\\' ) { $ winColor = Env :: get ( 'ANSICON' , Env :: VAR_BOOL ) || 'ON' === Env :: get ( 'ConEmuANSI' ) || 'xterm' === Env :: get ( 'TERM' ) ; return $ winColor ; } if ( ! defined ( 'STDOUT' ) ) { return false ; } return self :: isInteractive ( STDOUT ) ; }
Returns true if STDOUT supports colorization.

This code has been copied and adapted from
Symfony\Component\Console\Output\OutputStream.

@return bool
@codeCoverageIgnore
Returns true if STDOUT supports colorization .