Function: defined-colors

defined-colors is a byte-compiled function defined in faces.el.gz.

Signature

(defined-colors &optional FRAME)

Documentation

Return a list of colors supported for a particular frame.

The argument FRAME specifies which frame to try. The value may be different for frames on different display types. If FRAME doesn't support colors, the value is nil. If FRAME is nil, that stands for the selected frame.

View in manual

Probably introduced at or before Emacs version 21.1.

Aliases

x-defined-colors (obsolete since 30.1)

Source Code

;; Defined in /usr/src/emacs/lisp/faces.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Frame-type independent color support.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun defined-colors (&optional frame)
  "Return a list of colors supported for a particular frame.
The argument FRAME specifies which frame to try.
The value may be different for frames on different display types.
If FRAME doesn't support colors, the value is nil.
If FRAME is nil, that stands for the selected frame."
  (if (display-graphic-p frame)
      (xw-defined-colors frame)
    (mapcar 'car (tty-color-alist frame))))