Function: display-visual-class

display-visual-class is a byte-compiled function defined in frame.el.gz.

Signature

(display-visual-class &optional DISPLAY)

Documentation

Return the visual class of DISPLAY.

The value is one of the symbols static-gray, gray-scale, static-color, pseudo-color, true-color, or direct-color. DISPLAY can be a display name or a frame. If DISPLAY is omitted or nil, it defaults to the selected frame's display.

View in manual

Probably introduced at or before Emacs version 21.1.

Source Code

;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun display-visual-class (&optional display)
  "Return the visual class of DISPLAY.
The value is one of the symbols `static-gray', `gray-scale',
`static-color', `pseudo-color', `true-color', or `direct-color'.
DISPLAY can be a display name or a frame.
If DISPLAY is omitted or nil, it defaults to the selected frame's display."
  (let ((frame-type (framep-on-display display)))
    (cond
     ((memq frame-type '(x w32 ns haiku pgtk android))
      (x-display-visual-class display))
     ((and (memq frame-type '(pc t))
	   (tty-display-color-p display))
      'static-color)
     (t
      'static-gray))))