/[emacs]/emacs/lisp/term/tty-colors.el
ViewVC logotype

Diff of /emacs/lisp/term/tty-colors.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11.2.2 by miles, Sat Apr 10 06:15:02 2004 UTC revision 1.11.2.3 by miles, Sat Sep 4 09:18:39 2004 UTC
# Line 864  of gray, thus the name." Line 864  of gray, thus the name."
864      (if (< mag 1) 0 (acos (/ (+ r g b) mag)))))      (if (< mag 1) 0 (acos (/ (+ r g b) mag)))))
865    
866  (defun tty-color-approximate (rgb &optional frame)  (defun tty-color-approximate (rgb &optional frame)
867    "Given a list of 3 rgb values in RGB, find the color in `tty-color-alist'    "Find the color in `tty-color-alist' that best approximates RGB.
868  which is the best approximation in the 3-dimensional RGB space,  Value is a list of the form \(NAME INDEX R G B\).
869  and return its description.  The argument RGB should be an rgb value, that is, a list of three
870    integers in the 0..65535 range.
 Value is a list of the form \(NAME INDEX R G B\).  Note that the returned  
 NAME is not necessarily the same string as the argument COLOR, because  
 the latter might need to be approximated if it is not supported directly.  
   
 Each value of the RGB triplet should be in the range 0..65535 range.  
871  FRAME defaults to the selected frame."  FRAME defaults to the selected frame."
872    (let* ((color-list (tty-color-alist frame))    (let* ((color-list (tty-color-alist frame))
873           (candidate (car color-list))           (candidate (car color-list))

Legend:
Removed from v.1.11.2.2  
changed lines
  Added in v.1.11.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26