read-color

read-color is an interactive compiled Lisp function in `faces.el'.


(read-color &optional PROMPT CONVERT-TO-RGB ALLOW-EMPTY-NAME MSG)

Read a color name or RGB triplet.
Completion is available for color names, but not for RGB triplets.

RGB triplets have the form "#RRGGBB". Each of the R, G, and B
components can have one to four digits, but all three components
must have the same number of digits. Each digit is a hex value
between 0 and F; either upper case or lower case for A through F
are acceptable.

In addition to standard color names and RGB hex values, the
following are available as color candidates. In each case, the
corresponding color is used.

* `foreground at point' - foreground under the cursor
* `background at point' - background under the cursor

Optional arg PROMPT is the prompt; if nil, use a default prompt.

Interactively, or with optional arg CONVERT-TO-RGB-P non-nil,
convert an input color name to an RGB hex string. Return the RGB
hex string.

If optional arg ALLOW-EMPTY-NAME is non-nil, the user is allowed
to enter an empty color name (the empty string).

Interactively, or with optional arg MSG non-nil, print the
resulting color name in the echo area.