module IRB::Color

def colorable?

Experimental RBS support (using type sampling data from the type_fusion project).

def colorable?: () -> true

This signature was generated using 1 sample from 1 application.

def colorable?
  supported = $stdout.tty? && (/mswin|mingw/ =~ RUBY_PLATFORM || (ENV.key?('TERM') && ENV['TERM'] != 'dumb'))
  # because ruby/debug also uses irb's color module selectively,
  # irb won't be activated in that case.
  if IRB.respond_to?(:conf)
    supported && IRB.conf.fetch(:USE_COLORIZE, true)
  else
    supported
  end
end