+The color values are returned for @var{frame}'s display. If
+@var{frame} is omitted or @code{nil}, the information is returned for
+the selected frame's display. If the frame cannot display colors, the
+value is @code{nil}.
+
+@findex x-color-values
+This function used to be called @code{x-color-values},
+and that name is still supported as an alias.
+@end defun
+
+@node Text Terminal Colors
+@section Text Terminal Colors
+@cindex colors on text-only terminals
+
+ Text-only terminals usually support only a small number of colors,
+and the computer uses small integers to select colors on the terminal.
+This means that the computer cannot reliably tell what the selected
+color looks like; instead, you have to inform your application which
+small integers correspond to which colors. However, Emacs does know
+the standard set of colors and will try to use them automatically.
+
+ The functions described in this section control how terminal colors
+are used by Emacs.
+
+ Several of these functions use or return @dfn{rgb values}, described
+in @ref{Color Names}.
+
+ These functions accept a display (either a frame or the name of a
+terminal) as an optional argument. We hope in the future to make Emacs
+support more than one text-only terminal at one time; then this argument
+will specify which terminal to operate on (the default being the
+selected frame's terminal; @pxref{Input Focus}). At present, though,
+the @var{frame} argument has no effect.
+
+@defun tty-color-define name number &optional rgb frame
+@tindex tty-color-define
+This function associates the color name @var{name} with
+color number @var{number} on the terminal.
+
+The optional argument @var{rgb}, if specified, is an rgb value, a list
+of three numbers that specify what what the color actually looks like.
+If you do not specify @var{rgb}, then this color cannot be used by
+@code{tty-color-approximate} to approximate other colors, because
+Emacs will not know what it looks like.
+@end defun
+
+@defun tty-color-clear &optional frame
+@tindex tty-color-clear
+This function clears the table of defined colors for a text-only terminal.
+@end defun
+
+@defun tty-color-alist &optional frame
+@tindex tty-color-alist
+This function returns an alist recording the known colors supported by a
+text-only terminal.
+
+Each element has the form @code{(@var{name} @var{number} . @var{rgb})}
+or @code{(@var{name} @var{number})}. Here, @var{name} is the color
+name, @var{number} is the number used to specify it to the terminal.
+If present, @var{rgb} is a list of three color values (for red, green,
+and blue) that says what the color actually looks like.
+@end defun
+
+@defun tty-color-approximate rgb &optional frame
+@tindex tty-color-approximate
+This function finds the closest color, among the known colors
+supported for @var{display}, to that described by the rgb value
+@var{rgb} (a list of color values). The return value is an element of
+@code{tty-color-alist}.
+@end defun
+
+@defun tty-color-translate color &optional frame
+@tindex tty-color-translate
+This function finds the closest color to @var{color} among the known
+colors supported for @var{display} and returns its index (an integer).
+If the name @var{color} is not defined, the value is @code{nil}.