Function: tty-color-24bit
tty-color-24bit is a byte-compiled function defined in
tty-colors.el.gz.
Signature
(tty-color-24bit RGB &optional DISPLAY)
Documentation
Return 24-bit color pixel value for RGB value on DISPLAY.
DISPLAY can be a display name or a frame, and defaults to the selected frame's display. If DISPLAY is not on a 24-but TTY terminal, return nil.
Source Code
;; Defined in /usr/src/emacs/lisp/term/tty-colors.el.gz
(defun tty-color-24bit (rgb &optional display)
"Return 24-bit color pixel value for RGB value on DISPLAY.
DISPLAY can be a display name or a frame, and defaults to the
selected frame's display.
If DISPLAY is not on a 24-but TTY terminal, return nil."
(when (and rgb (= (display-color-cells display) 16777216))
(let ((r (ash (car rgb) -8))
(g (ash (cadr rgb) -8))
(b (ash (nth 2 rgb) -8)))
(logior (ash r 16) (ash g 8) b))))