Function: display-grayscale-p

display-grayscale-p is a byte-compiled function defined in faces.el.gz.

Signature

(display-grayscale-p &optional DISPLAY)

Documentation

Return non-nil if frames on DISPLAY can display shades of gray.

DISPLAY should be either a frame or a display name (a string). If omitted or nil, that stands for 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/faces.el.gz
(defun display-grayscale-p (&optional display)
  "Return non-nil if frames on DISPLAY can display shades of gray.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
  (if (display-graphic-p display)
      (x-display-grayscale-p display)
    (> (tty-color-gray-shades display) 2)))