t
if so; otherwise, nil
. The argument frame says
which frame's display to ask about; if frame is omitted or
nil
, the selected frame is used.
Note that this does not tell you whether the display you are using really supports that color. You can ask for any defined color on any kind of display, and you will get some result--that is how the X server works. Here's an approximate way to test whether your display supports the color color:
(defun x-color-supported-p (color &optional frame) (and (x-color-defined-p color frame) (or (x-display-color-p frame) (member color '("black" "white")) (and (> (x-display-planes frame) 1) (equal color "gray")))))
nil
.
(x-color-values "black") => (0 0 0) (x-color-values "white") => (65280 65280 65280) (x-color-values "red") => (65280 0 0) (x-color-values "pink") => (65280 49152 51968) (x-color-values "hungry") => nil
The color values are returned for frame's display. If frame
is omitted or nil
, the information is returned for the selected
frame's display.
Go to the first, previous, next, last section, table of contents.