Function: tty-color-by-index
tty-color-by-index is a byte-compiled function defined in
tty-colors.el.gz.
Signature
(tty-color-by-index IDX &optional FRAME)
Documentation
Given a numeric index of a tty color, return its description.
FRAME, if unspecified or nil, defaults to the selected frame. Value is a list of the form (NAME INDEX R G B).
Source Code
;; Defined in /usr/src/emacs/lisp/term/tty-colors.el.gz
(defun tty-color-by-index (idx &optional frame)
"Given a numeric index of a tty color, return its description.
FRAME, if unspecified or nil, defaults to the selected frame.
Value is a list of the form (NAME INDEX R G B)."
(and idx
(let ((colors (tty-color-alist frame))
desc found)
(while colors
(setq desc (car colors))
(if (eq idx (car (cdr desc)))
(setq found desc))
(setq colors (cdr colors)))
found)))