aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/frames.texi
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-06 05:29:15 +0000
committerRichard M. Stallman1994-09-06 05:29:15 +0000
commitfed7c77a18fa93dae47248a84c1bd983cd421af4 (patch)
tree90bae91755ebae2b8a2bde0df434ef91206a8554 /lispref/frames.texi
parent47c5a4719aa22391195863fdc4fe7e59968c0a03 (diff)
downloademacs-fed7c77a18fa93dae47248a84c1bd983cd421af4.tar.gz
emacs-fed7c77a18fa93dae47248a84c1bd983cd421af4.zip
entered into RCS
Diffstat (limited to 'lispref/frames.texi')
-rw-r--r--lispref/frames.texi43
1 files changed, 38 insertions, 5 deletions
diff --git a/lispref/frames.texi b/lispref/frames.texi
index b12b8aa70a0..e60fcf12fd6 100644
--- a/lispref/frames.texi
+++ b/lispref/frames.texi
@@ -979,12 +979,45 @@ This returns @code{t} if the connected X display has color, and
979@end defun 979@end defun
980 980
981@defun x-color-defined-p color 981@defun x-color-defined-p color
982This function reports whether a color name is meaningful and supported 982This function reports whether a color name is meaningful. It returns
983on the X display Emacs is using. It returns @code{t} if the display 983@code{t} if so; otherwise, @code{nil}.
984supports that color; otherwise, @code{nil}.
985 984
986Black-and-white displays support just two colors, @code{"black"} or 985Note that this does not tell you whether the display you are using
987@code{"white"}. Color displays support many other colors. 986really supports that color. You can ask for any defined color on any
987kind of display, and you will get some result---that is how the X server
988works. Here's an approximate way to test whether your display supports
989the color @var{color}:
990
991@example
992(defun x-color-supported-p (color)
993 (and (x-color-defined-p color)
994 (or (x-display-color-p)
995 (member color '("black" "white"))
996 (and (> (x-display-planes) 1)
997 (equal color "gray")))))
998@end example
999@end defun
1000
1001@defun x-color-values color
1002This function returns a value that describes what @var{color} should
1003ideally look like. If @var{color} is defined, the value is a list of
1004three integers, which give the amount of red, the amount of green, and
1005the amount of blue. Each integer ranges in principle from 0 to 65535,
1006but in practice no value seems to be above 65280. If @var{color} is not
1007defined, the value is @code{nil}.
1008
1009@example
1010(x-color-values "black")
1011 @result{} (0 0 0)
1012(x-color-values "white")
1013 @result{} (65280 65280 65280)
1014(x-color-values "red")
1015 @result{} (65280 0 0)
1016(x-color-values "pink")
1017 @result{} (65280 49152 51968)
1018(x-color-values "hungry")
1019 @result{} nil
1020@end example
988@end defun 1021@end defun
989 1022
990@defun x-synchronize flag 1023@defun x-synchronize flag