tty-color-approximate

tty-color-approximate is a compiled Lisp function in `tty-colors.el'.

(tty-color-approximate RGB &optional FRAME)

Find the color in `tty-color-alist' that best approximates RGB.
Value is a list of the form (NAME INDEX R G B).
The argument RGB should be an rgb value, that is, a list of three
integers in the 0..65535 range.
FRAME defaults to the selected frame.