private static function hasColorSupport()
    {
        if (isset(self::$hasColorSupport)) {
            return self::$hasColorSupport;
        }

        if (DIRECTORY_SEPARATOR === '\\') {
            return self::$hasColorSupport =
                (10 == PHP_WINDOWS_VERSION_MAJOR && PHP_WINDOWS_VERSION_BUILD >= 10586)
                || false !== getenv('ANSICON')
                || 'ON' === getenv('ConEmuANSI')
                || 'xterm' === getenv('TERM');
        }

        return self::$hasColorSupport = function_exists('posix_isatty') && @posix_isatty(STDOUT);
    }