Function: tty-display-color-p

tty-display-color-p is a function defined in term.c.

Signature

(tty-display-color-p &optional TERMINAL)

Documentation

Return non-nil if the tty device TERMINAL can display colors.

TERMINAL can be a terminal object, a frame, or nil (meaning the selected frame's terminal). This function always returns nil if TERMINAL does not refer to a text terminal.

Source Code

// Defined in /usr/src/emacs/src/term.c
{
  struct terminal *t = decode_tty_terminal (terminal);

  return (t && t->display_info.tty->TN_max_colors > 0) ? Qt : Qnil;
}