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.

Probably introduced at or before Emacs version 21.1.

Aliases

x-defined-colors

Source Code

;; Defined in /usr/src/emacs/lisp/faces.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Frame-type independent color support.
;;; We keep the old x-* names as aliases for back-compatibility.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(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))))