Method: TTY::Color#mode

Defined in:
lib/tty/color.rb

#modeInteger

Check how many colors this terminal supports

Returns:

  • (Integer)


49
50
51
# File 'lib/tty/color.rb', line 49

def mode
  Mode.new(ENV).mode
end