Function: display-color-cells

display-color-cells is a byte-compiled function defined in frame.el.gz.

Signature

(display-color-cells &optional DISPLAY)

Documentation

Return the number of color cells supported by DISPLAY.

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.

Aliases

mh-display-color-cells (obsolete since 29.1)

Source Code

;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun display-color-cells (&optional display)
  "Return the number of color cells supported by DISPLAY.
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))
      (x-display-color-cells display))
     ((eq frame-type 'pc)
      16)
     (t
      (tty-display-color-cells display)))))